るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.052秒)
トップページ > クエリ:NoMethodError[x] > クエリ:method_missing[x]

別のキーワード

  1. irb/input-method gets
  2. irb/input-method new
  3. _builtin define_method
  4. irb/input-method encoding
  5. irb/input-method readable_atfer_eof?

ライブラリ

クラス

検索結果

BasicObject#method_missing(name, *args) -> object (18119.0)

呼びだされたメソッドが定義されていなかった時、Rubyインタプリタがこのメソッド を呼び出します。

...ルトではこのメソッドは例外 NoMethodError を発生させます。


@param name 未定義メソッドの名前(シンボル)です。
@param args 未定義メソッドに渡された引数です。
@return ユーザー定義の method_missing メソッドの返り値が未定義メ...
...ドの返り値で
あるかのように見えます。

//emlist[例][ruby]{
class Foo
def initialize(data)
@data = data
end
def method_missing(name, lang)
if name.to_s =~ /\Afind_(\d+)_in\z/
if @data[lang]
p @data[lang][$1.to_i]
else
raise "#{lang} unkno...

ruby 1.8.4 feature (12.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...pected '(', expecting $end

#Tue Nov 1 14:20:11 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (rb_call_super): should call method_missing if super is
# called from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# inform...
...-22) [i686-linux]
-:3:in `foo'-:3: warning: too many arguments for format string
: super: no superclass method `foo' (NoMethodError)
from -:7

: 正規表現 [bug]

#Wed Oct 19 01:27:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * regex.c (re_com...