[前][次][番号順一覧][スレッド一覧][生データ]

yarv-dev-en:169

From: John Turner <xennocide yahoo.com>
Date: Wed, 30 Aug 2006 15:02:54 +0100
Subject: [yarv-dev-en:169] Illegal break error message needs file name/line number information.

Found this while trying to debug a crash in a library that was failing 
to require due to a badly placed "break", one outside of a loop.

given the file "foo.rb":
puts "foo"
break
puts "bar"

The command "ruby foo.rb" gives:
Illegal break
foo.rb:3: compile error (SyntaxError)

Where the "3" is the last line of the file.  This makes finding where 
the actual error was relatively hard.

This is compared to "ruby1.8 foo.rb" giving:
foo
foo.rb:2: unexpected break (LocalJumpError)

Thanks,
John

--
ML: yarv-dev-en quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]

->     169 2006-08-30 23:02 [xennocide yahoo.com ] Illegal break error message needs file name/line number information.
       172 2006-09-05 23:46 ┗[ko1 atdot.net       ] open>Re: Illegal break error message needs file name/line number information.