yarv-dev:1084
From: SASADA Koichi <ko1 atdot.net>
Date: Thu, 17 Aug 2006 22:45:58 +0900
Subject: [yarv-dev:1084] fixed> Re: open> stack message when StandardError raised
ささだです. なーんか嫌な感じですが,アドホックに対処しました. sheepman wrote: > こんにちは、sheepman です。 > 例外が発生した時に表示されるスタックが、実際のものとは異なっています。 > > $ cat t.rb > class C > > Class.class_eval %{ > define_method(:raize, lambda { raise StandardError }) > } > > def f > cl = self.class > cl.raize > end > > end > > c = C.new > c.f > > $ ruby-2.0 -v t.rb > ruby 2.0.0 (Base: Ruby 1.9.0 2006-04-08) [i686-linux] > YARVCore 0.4.1 Rev: 527 (2006-07-19) [opts: [direct threaded code] [inline method cache] ] > (eval):2:in `raise': StandardError (StandardError) > from (eval):2:in `block (2 levels) in <class:C>' > from t.rb:9:in `class' > from t.rb:9:in `f' > from t.rb:15:in `<main>' > > この下から3行目の「from t.rb:9:in `class'」は実際は「from t.rb:9:in `raize'」が正しいんだと思います。 > self.class が呼ばれているのは8行目だし。 > -- // SASADA Koichi at atdot dot net -- ML: yarv-dev quickml.atdot.net Info: http://www.atdot.net/~ko1/quickml
1073 2006-07-30 10:28 [sheepman sheepman.sa] open> stack message when StandardError raised -> 1084 2006-08-17 22:45 ┗[ko1 atdot.net ] fixed> Re: open> stack message when StandardError raised