るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

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

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

...義の 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} unknown"
end
else
super
end
end
end

dic = Foo.new({:English => %w(zero one two), :Esperanto => %w(nulo unu du)})
dic.find_2_in :Esperanto #=> "du"
//}

[注意] このメソッドを override する場合は対象...

NEWS for Ruby 3.0.0 (54.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern mat...
...*
* Can be sliced with Enumerator::ArithmeticSequence

//emlist[][ruby]{
dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}

* Binding
* Binding#eval when called with one argument will use `"(...
...r a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature...

ruby 1.8.4 feature (36.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...
...グの修正。((<ruby-dev:27331>))

: IO [bug]

#Wed Sep 28 08:12:18 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * io.c (read_buffered_data): check if reached EOF. fixed: [ruby-dev:27334]

Solaris(64bit?)などでEOF後にゴミを読み出すことがあったバグを修正。...
...れました.

# * ext/tk/lib/tk/event.rb: add :data key for virtual events [Tk8.5
# feature].
#

Tcl/Tk8.5 への対応のため,仮想イベントのイベント情報の一つである data
キーの情報を :data で指定できるようになりました.

#Fri Nov...