Skip to content

Commit

Permalink
* ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from
Browse files Browse the repository at this point in the history
  the callback method. (Fiddle already allows it.)
  [Bug ruby#6389] [ruby-dev:45604]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Aug 17, 2012
1 parent 211525d commit 4a097d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Aug 17 12:39:33 2012 NAKAMURA Usaku <[email protected]>

* 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 <[email protected]>

* vm_trace.c, vm_core.h: simplify tracing mechanism.
Expand Down
3 changes: 3 additions & 0 deletions ext/dl/lib/dl/func.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def call *args
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)
Expand Down

0 comments on commit 4a097d2

Please sign in to comment.