[MacRuby-devel] [MacRuby] #674: Shoulda fails because of oddity with block_given?
MacRuby
ruby-noreply at macosforge.org
Tue May 4 06:34:48 PDT 2010
#674: Shoulda fails because of oddity with block_given?
---------------------------------+------------------------------------------
Reporter: marick@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords:
---------------------------------+------------------------------------------
Comment(by marick@…):
This code is maybe clearer about what's going on:
{{{
def should(&a_block_that_is_never_called)
stash_block {
puts "block_given? is #{block_given?}."
}
end
def stash_block(&block)
$block = block
end
should do "something, but not in this test" end
$block.call
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/674#comment:4>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list