241件ヒット
[201-241件を表示]
(0.053秒)
別のキーワード
モジュール
- Kernel (205)
- Marshal (24)
- ObjectSpace (12)
キーワード
-
_ _ callee _ _ (12) -
_ _ method _ _ (12) - caller (36)
-
count
_ nodes (12) - dump (24)
- eval (24)
- fail (36)
- lambda (18)
- proc (19)
- raise (36)
-
require
_ relative (12)
検索結果
先頭4件
-
Kernel
. # _ _ callee _ _ -> Symbol | nil (37.0) -
現在のメソッド名を返します。 メソッドの外で呼ばれると nil を返します。
...//emlist[例][ruby]{
def foo
p __callee__
end
alias :bar :foo
foo # => :foo
bar # => :bar
p __callee__ # => nil
//}
Kernel.#__method__ とは異なり、現在のメソッド名が alias されたメ
ソッドの場合には alias 先のメソッド名を返します。
@see Kernel.#__method__... -
Kernel
. # require _ relative(relative _ feature) -> bool (25.0) -
現在のファイルからの相対パスで require します。
...扱い方はKernel.#loadでも同様です。
//emlist[例][ruby]{
# ---------- some.rb -----------
$a = 1
@a = 1
A = 1
a = 1
# ---------- end some.rb -------
require 'some'
p $a #=> 1
p @a #=> 1
p A #=> 1
p a # undefined local variable or method `a' for #<Object:0x294f9ec @a=1> (NameError)
//}... -
Marshal
. # dump(obj , limit = -1) -> String (25.0) -
obj を指定された出力先に再帰的に出力します。
...具体的には以下のイン
スタンス。Dir, File::Stat, IO とそのサブクラス
File, Socket など。
* MatchData, Data, Method, UnboundMethod,
Proc, Thread, ThreadGroup, Continuation
のインスタンス。
* 特異メソッドを定義したオブジェクト
また、......えば、デフォルト値を求めるブロックを持った Hash は
Proc を間接的に指していることになります。
//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}
マーシャルの動作を任意に定義す... -
Marshal
. # dump(obj , port , limit = -1) -> IO (25.0) -
obj を指定された出力先に再帰的に出力します。
...具体的には以下のイン
スタンス。Dir, File::Stat, IO とそのサブクラス
File, Socket など。
* MatchData, Data, Method, UnboundMethod,
Proc, Thread, ThreadGroup, Continuation
のインスタンス。
* 特異メソッドを定義したオブジェクト
また、......えば、デフォルト値を求めるブロックを持った Hash は
Proc を間接的に指していることになります。
//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}
マーシャルの動作を任意に定義す...