るりまサーチ

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

別のキーワード

  1. irb/input-method new
  2. irb/input-method gets
  3. _builtin define_method
  4. irb/input-method encoding
  5. irb/input-method readable_atfer_eof?

種類

ライブラリ

検索結果

WeakRef (38030.0)

weak reference を実現するクラスです。

...weak reference を実現するクラスです。

WeakRef
オブジェクトは与えられたオブジェクトをポイントしますが、
ポイント先のオブジェクトは GC される可能性があります。
アクセスしようとしたときにオブジェクトが GC されてい...
...れば
WeakRef
::RefError が発生します。

delegate も参照してください。

=== サンプルコード

require 'weakref'

foo = Object.new
ref = WeakRef.new(foo)
ref.some_method_of_foo...

NEWS for Ruby 3.0.0 (138.0)

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

...a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern...
...e, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}

* Endless method definition is added. [EXPERIMENTAL]
16746

//emlist{
def square(x) = x * x
//}

* Interpolated String literals are no longer frozen when...
...lv
* rinda
* set
* securerandom
* shellwords
* tempfile
* tmpdir
* time
* tsort
* un
* weakref
* The following extensions are promoted to default gems from stdlib.
* digest
* io-nonblock
* io-wait
* nkf
* p...