るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

キーワード

検索結果

Fiddle::Pointer#ref -> Fiddle::Pointer (15113.0)

自身を指す Pointer オブジェクトを返します。 C 言語におけるポインタへのアドレス演算子の適用 &p と同じです。

...値には、free 関数がセットされず、size は 0 とされます。

例:

require 'fiddle'

s = 'abc'
cptr = Fiddle::Pointer[s]
cref = cptr.ref
p cref.to_s(4).unpack('l*')[0] #=> 136121648
p cptr.to_i #=> 136121648
p cref.ptr.to_s #=> "abc"...

NEWS for Ruby 3.0.0 (24.0)

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

...`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis] foundation is
in...
...r hooks in a non-blocking context. 16786
* Ractor
* New class added to enable parallel execution. See rdoc-ref:ractor.md for more details.
* Random
* `Random::DEFAULT` now refers to the `Random` class instead of being a `Random` instance, so it can work with `Ractor`. 17322
* `Random...
...er`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`, `#odd?`, `#ord`, `#to_i`, `#to_int`, `#zero?`
* `Struct`: reader methods for 10th or later members
* Constant references are inlined.
* Always generate appropriate code for `==`, `nil?`, and `!` calls depen...

Object::DATA -> File (18.0)

スクリプトの __END__ プログラムの終り以降をアクセスする File オブジェクト。

...烟花三月下揚州
孤帆遠影碧空尽
唯見長江天際流

=== 例2
sum = 0
DATA.each_line do |line|
sum += line.to_i
end

DATA.rewind
p DATA.gets # => "sum = 0¥n"

__END__
17
19
23
29
31

=== 例3
DATA.gets #...

Symbol#to_proc -> Proc (18.0)

self に対応する Proc オブジェクトを返します。

...f という名前のメソッドを
残りの引数を渡して呼びだします。


//emlist[明示的に呼ぶ例][ruby]{
:to_i.to_proc["ff", 16] # => 255 ← "ff".to_i(16)と同じ
//}

//emlist[暗黙に呼ばれる例][ruby]{
# メソッドに & とともにシンボルを渡すと
# to_proc...
...クトは lambda です。
//emlist[][ruby]{
:object_id.to_proc.lambda? # => true
//}

//emlist[明示的に呼ぶ例][ruby]{
:to_i.to_proc["ff", 16] # => 255 ← "ff".to_i(16)と同じ
//}

//emlist[暗黙に呼ばれる例][ruby]{
# メソッドに & とともにシンボルを渡すと
# to_proc...

Fiddle::Pointer#-@ -> Fiddle::Pointer (13.0)

自身を指す Pointer オブジェクトを返します。 C 言語におけるポインタへのアドレス演算子の適用 &p と同じです。

...値には、free 関数がセットされず、size は 0 とされます。

例:

require 'fiddle'

s = 'abc'
cptr = Fiddle::Pointer[s]
cref = cptr.ref
p cref.to_s(4).unpack('l*')[0] #=> 136121648
p cptr.to_i #=> 136121648
p cref.ptr.to_s #=> "abc"...

絞り込み条件を変える

Fiddle::Pointer#+@ -> Fiddle::Pointer (12.0)

自身の指す値を Pointer にして返します。

...り値には、free 関数がセットされず、size は 0 とされます。

例:

require 'fiddle'

s = 'abc'
cptr = Fiddle::Pointer[s]
cref = cptr.ref
p cref.to_s(4).unpack('l*')[0] #=> 136121648
p cptr.to_i #=> 136121648
p cref.ptr.to_s #=> "abc"...

Fiddle::Pointer#ptr -> Fiddle::Pointer (12.0)

自身の指す値を Pointer にして返します。

...り値には、free 関数がセットされず、size は 0 とされます。

例:

require 'fiddle'

s = 'abc'
cptr = Fiddle::Pointer[s]
cref = cptr.ref
p cref.to_s(4).unpack('l*')[0] #=> 136121648
p cptr.to_i #=> 136121648
p cref.ptr.to_s #=> "abc"...