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] &gt; cat explicit_return_from_block.rb
def foo
  File.open(&#39;/boot/vmlinuz&#39;) do |f|
    return &#39;foo&#39;
  end
end

p foo
tilman@centaur [~/devel/rubinius] &gt; 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">&lt;no</span> <span class="err">file</span><span class="nt">&gt;</span>
</pre></div>
</td></tr></table>