#674: Shoulda fails because of oddity with block_given? ---------------------------------+------------------------------------------ Reporter: mar...@… | Owner: lsansone...@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------
Comment(by mar...@…): 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/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel