1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from

the callback method. (Fiddle already allows it.)
  [Bug #6389] [ruby-dev:45604]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2012-08-17 03:42:19 +00:00
parent 211525d710
commit 4a097d2e3e
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Fri Aug 17 12:39:33 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from
the callback method. (Fiddle already allows it.)
[Bug #6389] [ruby-dev:45604]
Thu Aug 16 19:54:24 2012 Koichi Sasada <ko1@atdot.net>
* vm_trace.c, vm_core.h: simplify tracing mechanism.

View file

@ -90,6 +90,9 @@ module DL
if( !block )
raise(RuntimeError, "block must be given.")
end
unless block.lambda?
block = Class.new{define_method(:call, block)}.new.method(:call)
end
if( @cfunc.ptr == 0 )
cb = Proc.new{|*args|
ary = @stack.unpack(args)