るりまサーチ

最速Rubyリファレンスマニュアル検索!
96件ヒット [1-96件を表示] (0.013秒)
トップページ > クエリ:ArgumentError[x] > クラス:Object[x]

別のキーワード

  1. _builtin argumenterror
  2. on argumenterror
  3. new argumenterror
  4. dump argumenterror
  5. parse argumenterror

ライブラリ

キーワード

検索結果

Object#clone(freeze: nil) -> object (7.0)

オブジェクトの複製を作成して返します。

...e されていれば freeze されたコピーを、freeze されていなければ freeze されていないコピーを返します。
@raise ArgumentError TrueClass などの常に freeze されているオブジェクトの freeze されていないコピーを作成しようとしたときに...
..._d) #=> true
p(obj_d.tainted?) #=> true
p(obj_d.frozen?) #=> false
p(obj_d.respond_to?(:fuga)) #=> false
//}

@see Object#initialize_copy

=== 深いコピーと浅いコピー

clone や dup はオブジェクト自身を複製するだけで、オブジェクトの...
...d) #=> true
p(obj_d.tainted?) #=> false
p(obj_d.frozen?) #=> false
p(obj_d.respond_to?(:fuga)) #=> false
//}

@see Object#initialize_copy

=== 深いコピーと浅いコピー

clone や dup はオブジェクト自身を複製するだけで、オブジェクトの...
...obj_d)) #=> false
p(obj == obj_d) #=> true
p(obj_d.frozen?) #=> false
p(obj_d.respond_to?(:fuga)) #=> false
//}

@see Object#initialize_copy

=== 深いコピーと浅いコピー

clone や dup はオブジェクト自身を複製するだけで、オブジェクトの...

Object#dup -> object (7.0)

オブジェクトの複製を作成して返します。

...e されていれば freeze されたコピーを、freeze されていなければ freeze されていないコピーを返します。
@raise ArgumentError TrueClass などの常に freeze されているオブジェクトの freeze されていないコピーを作成しようとしたときに...
..._d) #=> true
p(obj_d.tainted?) #=> true
p(obj_d.frozen?) #=> false
p(obj_d.respond_to?(:fuga)) #=> false
//}

@see Object#initialize_copy

=== 深いコピーと浅いコピー

clone や dup はオブジェクト自身を複製するだけで、オブジェクトの...
...d) #=> true
p(obj_d.tainted?) #=> false
p(obj_d.frozen?) #=> false
p(obj_d.respond_to?(:fuga)) #=> false
//}

@see Object#initialize_copy

=== 深いコピーと浅いコピー

clone や dup はオブジェクト自身を複製するだけで、オブジェクトの...
...obj_d)) #=> false
p(obj == obj_d) #=> true
p(obj_d.frozen?) #=> false
p(obj_d.respond_to?(:fuga)) #=> false
//}

@see Object#initialize_copy

=== 深いコピーと浅いコピー

clone や dup はオブジェクト自身を複製するだけで、オブジェクトの...

Object#enum_for(method = :each, *args) -> Enumerator (7.0)

Enumerator.new(self, method, *args) を返します。

...num) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n < 0
unless block_given?
# __method__ はここでは :repeat
return to_enum(__method__, n) do...

Object#enum_for(method = :each, *args) {|*args| ... } -> Enumerator (7.0)

Enumerator.new(self, method, *args) を返します。

...num) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n < 0
unless block_given?
# __method__ はここでは :repeat
return to_enum(__method__, n) do...

Object#public_send(name, *args) -> object (7.0)

オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。

...}

@param name 文字列かSymbol で指定するメソッド名です。

@param args 呼び出すメソッドに渡す引数です。

@raise ArgumentError name を指定しなかった場合に発生します。

@raise NoMethodError protected メソッドや private メソッドに対して実...
...
した場合に発生します。

//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}

@see BasicObject#__send__, Object#send...

絞り込み条件を変える

Object#public_send(name, *args) { .... } -> object (7.0)

オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。

...}

@param name 文字列かSymbol で指定するメソッド名です。

@param args 呼び出すメソッドに渡す引数です。

@raise ArgumentError name を指定しなかった場合に発生します。

@raise NoMethodError protected メソッドや private メソッドに対して実...
...
した場合に発生します。

//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}

@see BasicObject#__send__, Object#send...

Object#to_enum(method = :each, *args) -> Enumerator (7.0)

Enumerator.new(self, method, *args) を返します。

...num) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n < 0
unless block_given?
# __method__ はここでは :repeat
return to_enum(__method__, n) do...

Object#to_enum(method = :each, *args) {|*args| ... } -> Enumerator (7.0)

Enumerator.new(self, method, *args) を返します。

...num) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n < 0
unless block_given?
# __method__ はここでは :repeat
return to_enum(__method__, n) do...