[#28337] constant look up order in CVS HEAD — Yukihiro Matsumoto <matz@...>

まつもと ゆきひろです

15 messages 2006/02/18
[#28338] Re: constant look up order in CVS HEAD — Tanaka Akira <akr@...17n.org> 2006/02/19

In article <1140229116.805371.31930.nullmailer@x31.priv.netlab.jp>,

[#28341] Re: constant look up order in CVS HEAD — GOTOU Yuuzou <gotoyuzo@...> 2006/02/19

In message <87lkw8xfay.fsf@m17n.org>,

[#28342] Re: constant look up order in CVS HEAD — Yukihiro Matsumoto <matz@...> 2006/02/19

まつもと ゆきひろです

[ruby-dev:28365] exception handling

From: sheepman <sheepman@...>
Date: 2006-02-22 01:43:08 UTC
List: ruby-dev #28365
こんにちは、sheepman です。
以下のような例外処理が ruby-1.9 では rescue されません。
ruby-1.9 で何か仕様が変わったんでしょうか。

$ cat t.rb
begin
  raise NameError
rescue
  puts "begin rescue yeah!"
  p $!
  p $!.name
end

$ ruby-1.9 -v t.rb
ruby 1.9.0 (2006-02-21) [i686-linux]
t.rb:2: NameError (NameError)

$ ruby-1.8.4 -v t.rb
ruby 1.8.4 (2005-12-24) [i686-linux]
begin rescue yeah!
#<NameError: NameError>
nil

-- 
sheepman / TAMURA Takashi
sheepman@sheepman.sakura.ne.jp http://sheepman.parfait.ne.jp/

In This Thread

Prev Next