F
Florian Gross
Moin!
Just thought I'd mention this:
C:\>ruby
alias $! $foo; $foo = 5; begin; raise "foo"; rescue => err; p err; end
^D
5
However:
C:\>ruby
alias $! $foo; $foo = 5; begin; raise "foo"; rescue Fixnum => err; p
err; end
^D
-:1: foo (RuntimeError)
I'm using ruby 1.8.1 (2003-12-25) [i386-mswin32] and I'm able to
reproduce the same behavior with ruby 1.8.0 (2003-08-04) [i686-linux-gnu].
Which means Ruby still knowns which exception was really raised, but
misrepresents it in case you're rescuing it to a variable.
I couldn't produce any crashes or other weird things by aliasing any
other global variables, by the way.
Regards,
Florian Gross
Just thought I'd mention this:
C:\>ruby
alias $! $foo; $foo = 5; begin; raise "foo"; rescue => err; p err; end
^D
5
However:
C:\>ruby
alias $! $foo; $foo = 5; begin; raise "foo"; rescue Fixnum => err; p
err; end
^D
-:1: foo (RuntimeError)
I'm using ruby 1.8.1 (2003-12-25) [i386-mswin32] and I'm able to
reproduce the same behavior with ruby 1.8.0 (2003-08-04) [i686-linux-gnu].
Which means Ruby still knowns which exception was really raised, but
misrepresents it in case you're rescuing it to a variable.
I couldn't produce any crashes or other weird things by aliasing any
other global variables, by the way.
Regards,
Florian Gross