22件ヒット
[1-22件を表示]
(0.027秒)
別のキーワード
検索結果
-
Object
# respond _ to?(name , include _ all = false) -> bool (18106.0) -
オブジェクトがメソッド name を持つとき真を返します。
...。
メソッドが定義されていない場合は、Object#respond_to_missing? を呼
び出してその結果を返します。
@param name Symbol または文字列で指定するメソッド名です。
@param include_all private メソッドと protected メソッドを確認の対象に......private
def hello
"Guten 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......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言語... -
ruby 1
. 8 . 4 feature (102.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...latform]: 対応プラットフォームの追加
== 目次
* ((<ruby 1.8.4 feature/Ruby本体>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/super [bug]>))
* ((<ruby 1.8.4 feature/正規表現 [bug]>))
* ((<ruby 1.8.4 feature/......re/Sun [bug]>))
* ((<ruby 1.8.4 feature/IA64 [bug]>))
== Ruby本体
: Symbol [bug]
# * parse.y (dsym): prohibit empty symbol literal by interpolation.
# fixed: [ruby-talk:166529]
式展開で空のSymbolを作ることができたバグの修正。 ((<ruby-talk:166529>))......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?のデフォルトの動作と同じ(public
メソッドにしか反応しない)にした。((<ruby-dev:2741...