Unnamed paste
pasted by Unknown [options]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <table class="sourcetable"><tr><td class="linenos"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14</pre></td><td class="code"><div class="source"><pre>tilman@centaur [~/devel/rubinius] > cat explicit_return_from_block.rb
def foo
File.open('/boot/vmlinuz') do |f|
return 'foo'
end
end
p foo
tilman@centaur [~/devel/rubinius] > bin/rbx explicit_return_from_block.rb
An exception has occurred:
Tried to use object of type String (48) as type Exception (17) (TypeError)
Backtrace:
*** Missing backtrace! Did the VM not create one? *** at <span class="nt"><no</span> <span class="err">file</span><span class="nt">></span>
</pre></div>
</td></tr></table>
|