From: murphy Date: 2007-12-23T06:58:29+09:00 Subject: Re: [BUG] Bus Error: block_given? (trunk) murphy wrote: > def foo > yield if block_given? > end > > foo(&:bar) and the same with def foo(&block) yield if block end foo(&:bar) bug-block.rb:2: -- control frame ---------- c:0005 p:---- s:0011 b:0011 l:000608 d:000010 IFUNC :proc c:0004 p:0007 s:0009 b:0009 l:000008 d:000008 METHOD bug-block.rb:2 c:0003 p:0014 s:0005 b:0005 l:000004 d:000004 TOP bug-block.rb:5 c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------ --------------------------- DBG> : "bug-block.rb:2:in `foo'" DBG> : "bug-block.rb:5:in `
'" -- backtrace of native function call (Use addr2line) -- 0xda5f6 0x1b425 0x1b4cb 0x9825b 0x9178697b 0xffffffff 0xd5f13 0xd8c8c 0xd8f59 0x1e944 0x234ba 0x1fbf 0x1f26 ------------------------------------------------------- [BUG] Bus Error ruby 1.9.0 (2007-12-23) [i686-darwin9.1.0] maybe something is wrong with &:bar then? [murphy]