44件ヒット
[1-44件を表示]
(0.020秒)
別のキーワード
種類
- 文書 (22)
- インスタンスメソッド (11)
- ライブラリ (11)
ライブラリ
- ビルトイン (11)
クラス
- Object (11)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
irb
/ completion (11) -
ruby 1
. 8 . 4 feature (11)
検索結果
先頭4件
-
Object
# respond _ to?(name , include _ all = false) -> bool (18106.0) -
オブジェクトがメソッド name を持つとき真を返します。
...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 (96.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...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......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
# information.
: super [bug]
Kerne......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 (18.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ルディスクリプタを閉じます
:close_others オプションのデフォルト値を true に変更しました
* 非互換: respond_to? は protected なメソッドに対して false を返します。第2引数に true を指定すると true を返します。
* 非互換:......:
* 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
上を参照......ors.
This means file descriptors doesn't inherit to spawned process unless
explicitly requested such as system(..., fd=>fd).
* Kernel#respond_to? against a protected method now returns false
unless the second argument is true.
* Object#respond_to_missing?, Object#initialize_clone,... -
irb
/ completion (18.0) -
irb の completion 機能を提供するライブラリです。
...がでます. 候補が唯一ならば完全に補完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspec......hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect foo.send
foo.__send__ foo.instance_eval foo.singleton_methods
foo.class foo.instance_of? foo.taint
fo...