36件ヒット
[1-36件を表示]
(0.052秒)
種類
- インスタンスメソッド (24)
- 文書 (12)
ライブラリ
- ビルトイン (24)
クラス
- Module (24)
キーワード
-
class
_ exec (12) -
ruby 1
. 9 feature (12)
検索結果
先頭3件
-
Module
# module _ exec(*args) {|*vars| . . . } -> object (21201.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = Thing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Modul... -
Module
# class _ exec(*args) {|*vars| . . . } -> object (3001.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = Thing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Modul... -
ruby 1
. 9 feature (18.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...ew]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど(互換性のある変更) (only backward-compatibility) (影響の範囲が小さいと思われる変更もこちら)
* [change]: 変更されたクラス/メソッドなど(互換性......spect
=== 2006-09-14
: digest.rb
: Digest::Base.file
=== 2006-09-13
: Hash#compare_by_identity
: Hash#compare_by_identity?
: Hash#identical
: Hash#identical?
=== 2006-09-12
: Hash#compare_by_identity
: Hash#compare_by_identity?
=== 2006-09-11
: Hash#identical
: Hash#identical?
=== 2006-08-3......call から改名
: Module#instance_exec [new]
: Module#module_exec [new]
追加
=== 2005-09-16
: ((<Dir/Dir.glob>)) [compat]
: ((<Dir/Dir.[]>)) [compat]
Dir.glob に配列を渡して複数のパターンを指定できるようになりました。
また、Dir[] は、複数の引...