るりまサーチ

最速Rubyリファレンスマニュアル検索!
58件ヒット [1-58件を表示] (0.023秒)

別のキーワード

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

検索結果

FrozenError#receiver -> object (18113.0)

self が発生した時のレシーバオブジェクトを返します。

...self が発生した時のレシーバオブジェクトを返します。

@raise ArgumentError レシーバが設定されていない時に発生します。

//emlist[][ruby]{
begin
[1, 2, 3].freeze << 4
rescue FrozenError => err
p err.receiver # => [1, 2, 3]
end
//}...

KeyError#receiver -> object (18113.0)

KeyError の原因となったメソッド呼び出しのレシーバを返します。

...e ArgumentError レシーバが設定されていない時に発生します。

例:

h = Hash.new
begin
h.fetch('gumby'*20)
rescue KeyError => e
p e.message # => "key not found: \"gumbygumbygumbygumbygumbygumbygumbygumbygumbygumbygumbygumbyg..."
p h.equal?(e.receiver)...

NEWS for Ruby 2.7.0 (42.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ド引数付きで呼び出すとArgumentErrorになります。 14183

//emlist[][ruby]{
def foo(h, **nil); end; foo(key: 1) # ArgumentError
def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError
def foo(h, **nil); end; foo("str" => 1) # ArgumentError
def foo(h, **nil); end; foo({key: 1}...
...するようになりました。

//emlist[][ruby]{
def bar
lambda
end
bar { puts "Hello" } #=> tried to create Proc object without a block (ArgumentError)
//}

==== その他の変更

* 始端なしRangeが実験的に導入されました。
caseやComparable#clampや定数やDSLなど...
...したfreezeされたオブジェクトを返すFrozenError#receiverメソッドが
追加されました。FrozenErrorをRubyのコードで発生する時に設定できるように
FrozenError.newメソッドが :receiver オプションを受け付けるように
なり...

NEWS for Ruby 3.0.0 (42.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...eyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now mat...
...en called with the `freeze: true` keyword will call `#initialize_clone` with the `freeze: true` keyword, and will return a frozen copy even if the receiver is unfrozen. 16175
* Kernel#eval when called with two arguments will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated c...
...now affect classes and modules that have already included or prepended the receiver, mirroring the behavior if the arguments were included in the receiver before the other modules and classes included or prepended the receiver. 9573
* Module#public, Module#protected, Module#private, Module#publi...

NEWS for Ruby 2.2.0 (36.0)

NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...バグを修正しました。 9593

=== 組み込みクラスの更新

* Binding
* 追加: Binding#local_variables
* 追加: Binding#receiver

* Dir
* 追加: Dir#fileno

* Enumerable
* 追加: Enumerable#slice_after
* 追加: Enumerable#slice_when
* 拡張: Enumerabl...
...el
* 追加: Kernel.#itself(Object#itself)
* 改善: Kernel.#throw は、対応する catch ブロックがないとき ArgumentError ではなく
ArgumentError
のサブクラスである UncaughtThrowError を発生させるようになりました


* Process
* 拡張: Process...
...無限大が指定されたとき C99 で期待されるような値を返します。

* Proc
* 非互換: ArgumentError は発生しなくなりました。
* ArgumentError is no longer raised when lambda Proc is passed as a
block, and the number of yielded arguments does not match...

絞り込み条件を変える

NEWS for Ruby 2.3.0 (18.0)

NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...11498

* Module
* Module#deprecate_constant を追加
11398

* NameError
* レシーバーオブジェクトを返す NameError#receiver を追加
10881

* Numeric
* Numeric#positive?, Numeric#negative? を追加
11151

* Proc
* Proc#call ( Proc#[] , Proc#==...
...ェクト、Methodオブジェクト、またはブロック )が必須になりました。
ブロックが与えられない場合は ArgumentError が発生します。
11283

* pack/unpack (Array/String)
* `j`と`J`が追加されました。
11215


=== 標準添付ラ...
...バル変数の互換性に影響のある変更

* $SAFE
* $SAFE=2 と $SAFE=3 が廃止されました。$SAFE を2以上にすると ArgumentError が発生します。
5455

=== C API の更新

* rb_define_class_id_under() は既にクラスが定義済みなのに、
その...

NEWS for Ruby 2.5.0 (12.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...す 14043

* Range
* Range.new no longer hides exceptions when comparing begin and
end with #<=> and raise a "bad value for range" ArgumentError
but instead lets the exception from the #<=> call go through.
7688

* Regexp
* Onigmo 6.1.3-669ac9997619954c298da971fcfacccf...
...me.at は第2引数の精度を指定するための第3引数を指定できるようになりました
13919

* KeyError
* KeyError#receiver を追加 12063
* KeyError#key を追加 12063

* FrozenError
* 新しい例外クラスです 13224

=== 標準添付ライブラリ...

Ruby用語集 (12.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...扱いされない。
ただしパス名には使えず、ヌル文字を含んだ文字列を File.open や
Pathname.new に与えると ArgumentError が発生する。

他の言語では文字列の終端を意味することがあるので、文字列データをやりとり
するう...
...ような場所ではどこでも同じ
変数が読み書きできるため、レキシカルスコープではない。

: レシーバー
: receiver
メソッドは何らかの特定のオブジェクトについて呼び出される。
このオブジェクトをそのメソッド呼び出...