33件ヒット
[1-33件を表示]
(0.031秒)
別のキーワード
種類
- 文書 (22)
- インスタンスメソッド (11)
ライブラリ
- ビルトイン (11)
クラス
- Object (11)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
ruby 1
. 8 . 4 feature (11)
検索結果
-
Object
# respond _ to?(name , include _ all = false) -> bool (18118.0) -
オブジェクトがメソッド name を持つとき真を返します。
...uten Tag"
end
end
list = [F.new,D.new]
list.each{|it| puts it.hello if it.respond_to?(:hello)}
#=> Bonjour
list.each{|it| it.instance_eval("puts hello if it.respond_to?(:hello, true)")}
#=> Bonjour
# Guten Tag
module Template
def main
start
template_method
finish
end
def st......t implement template_method
end
puts ImplTemplateMethod.new.respond_to?(:template_method) # => true
# NotImplementedError が発生しているが、Rubyによる実装部のため true を返す
puts NotImplTemplateMethod.new.respond_to?(:template_method) # => true
# GNU/Linux で実行。C言語......による実装部のため false を返す
puts File.respond_to?(:lchmod) # => false
//}
@see Module#method_defined?... -
ruby 1
. 8 . 4 feature (132.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...feature/String#scan [bug]>))
* ((<ruby 1.8.4 feature/File.join [bug]>))
* ((<ruby 1.8.4 feature/Thread#pass [bug]>))
* ((<ruby 1.8.4 feature/Module#const_missing [bug]>))
* ((<ruby 1.8.4 feature/IO [bug]>))
* ((<ruby 1.8.4 feature/添付ライブラリ>))
* ((<ruby 1.8.4 feature/"Ruby/Tk">......1.8.4 (2005-12-22) [i686-linux]
:foo!
:bar?
4) :$- always treats next character literally:
p eval(":$-\n") # => :"$-\n"
p :$-( # => :"$-("
p :$- # => :"$- "
p :$-#.object_id # => 3950350
# => ru......by-lang.org>
#
# * eval.c (rb_obj_respond_to): check if obj responds to the given
# method with the given visibility. [ruby-dev:27408]
#
# * eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411]
rb_respond_to()をObject#respond_to?のデフォルトの動... -
NEWS for Ruby 2
. 0 . 0 (72.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ルディスクリプタを閉じます
:close_others オプションのデフォルト値を true に変更しました
* 非互換: respond_to? は protected なメソッドに対して false を返します。第2引数に true を指定すると true を返します。
* 非互換:......* Module
* 追加: Module#prepend 指定したモジュールを self の継承チェインの先頭に
「追加する」ことで self の定数、メソッド、モジュール変数を「上書き」します。
* 追加: Module.prepended, Module.prepend_features は Module.inc......:
* added main.define_method which defines a global function.
* added main.using, which imports refinements into the current file or
eval string. [experimental]
=== 組み込みクラスの互換性 (機能追加とバグ修正を除く)
* Array#values_at
上を参照...