るりまサーチ

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

別のキーワード

  1. socket int
  2. prime int_from_prime_division
  3. _builtin to_int
  4. mkmf convertible_int
  5. option int

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

TracePoint#self -> object (21114.0)

イベントを発生させたオブジェクトを返します。

...イベントを発生させたオブジェクトを返します。

以下のようにする事で同じ値を取得できます。


//emlist[例][ruby]{
trace.binding.eval('self')
//}

@see TracePoint#binding...
...返します。

以下のようにする事で同じ値を取得できます。

なお、self メソッドは binding が nil になる :c_call および :c_return イベントに対しても正しく動作します。

//emlist[例][ruby]{
trace.binding.eval('self')
//}

@see TracePoint#binding...

String#codepoints {|codepoint| block } -> self (6318.0)

文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)

...トの配列を返します。(self.each_codepoint.to_a と同じです)

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}

ブロックが指定された場合は String#each_codepoint と同じように動作し...
...ます。

Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。

@see String#each_codepoint...

StringIO#codepoints {|codepoint| ... } -> self (6303.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

StringIO#each_codepoint {|codepoint| ... } -> self (6303.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

String#each_codepoint {|codepoint| block } -> self (6302.0)

文字列の各コードポイントに対して繰り返します。

...ます。

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 42223, 41404, 42219, 42185]
//}

@see String#codepoints...

絞り込み条件を変える

StringIO#each_codepoint {|codepoint| ... } -> self (6302.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

Numeric#to_int -> Integer (6230.0)

self.to_i と同じです。

...
self
.to_i と同じです。

//emlist[例][ruby]{
(2+0i).to_int # => 2
Rational(3).to_int # => 3
//}...

Integer#to_int -> self (6220.0)

self を返します。

...
self
を返します。

//emlist[][ruby]{
10.to_i # => 10
//}...

Symbol#intern -> self (6219.0)

self を返します。

...self を返します。

例:

:foo.intern # => :foo

@see String#intern...

ARGF.class#each_codepoint { |c| ... } -> self (6218.0)

self の各コードポイントに対して繰り返しブロックを呼びだします。

...
self
の各コードポイントに対して繰り返しブロックを呼びだします。

ブロックの引数にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。

例:
# $ echo "line1\n" > test1.txt
# $ ec...
...ho "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,110,101,49,10,108,105,110,101,50,10,...

絞り込み条件を変える

<< 1 2 3 ... > >>