るりまサーチ

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

別のキーワード

  1. openssl g
  2. openssl g=
  3. dsa g
  4. dsa g=
  5. dh g

検索結果

<< < 1 2 3 4 5 ... > >>

Encoding::Converter#putback -> String (3113.0)

後の変換用に変換器内部で保持しているバイト列を max_numbytes で指定した バイト数だけ返します。max_numbytes を指定しなかった場合は保持しているバ イト列の全てを返します。

...ていたバイト列

//emlist[][ruby]{
ec = Encoding::Converter.new("utf-16le", "iso-8859-1")
src = "\x00\xd8\x61\x00"
dst = ""
p ec.primitive_convert(src, dst) #=> :invalid_byte_sequence
p ec.primitive_errinfo #=> [:invalid_byte_sequence, "UTF-16LE", "UTF-8", "\x00\xD8", "a\x00"]
p ec.putba...

Encoding::Converter#putback(max_numbytes) -> String (3113.0)

後の変換用に変換器内部で保持しているバイト列を max_numbytes で指定した バイト数だけ返します。max_numbytes を指定しなかった場合は保持しているバ イト列の全てを返します。

...ていたバイト列

//emlist[][ruby]{
ec = Encoding::Converter.new("utf-16le", "iso-8859-1")
src = "\x00\xd8\x61\x00"
dst = ""
p ec.primitive_convert(src, dst) #=> :invalid_byte_sequence
p ec.primitive_errinfo #=> [:invalid_byte_sequence, "UTF-16LE", "UTF-8", "\x00\xD8", "a\x00"]
p ec.putba...

Enumerator::ArithmeticSequence#hash -> Integer (3101.0)

自身のハッシュ値を返します。

...自身のハッシュ値を返します。

begin, end, step, exclude_end? が等しい Enumerable::ArithmeticSequence
同じハッシュ値を返します。...

Enumerator::ArithmeticSequence#inspect -> String (3101.0)

自身を人間が読みやすい形の文字列表現にして返します。

自身を人間が読みやすい形の文字列表現にして返します。

Enumerator::ArithmeticSequence#size -> Integer | nil (3101.0)

有限なら要素数を返します。 そうでなければ nil を返します。

有限なら要素数を返します。
そうでなければ nil を返します。

@return 要素数または nil を返します。

絞り込み条件を変える

Range#%(s) -> Enumerator::ArithmeticSequence (3101.0)

範囲内の要素を s おきに繰り返します。

...ロックを指定しなかった時かつ数値の Range の時は Enumerator::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)

//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
#...
...1
//}


非数値の Range では、イテレーションに「要素 + s」を使用します。
(文字列またはシンボルの Range で s に数値を指定した場合を除きます)

//emlist[数値以外の Range に対する例][ruby]{
# Time の Range は each でイテレー...
...トできない
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).each { |t| p t }
# => 'Range#each': can't iterate from Time (TypeError)

# step は使用可能
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).step(60*60*6) { |t| p t }
# => 2024-12-25 00:00:00 UTC
# 2024-12-25 06:00:00 UTC
#...

Range#step(s = 1) -> Enumerator::ArithmeticSequence (3101.0)

範囲内の要素を s おきに繰り返します。

...ロックを指定しなかった時かつ数値の Range の時は Enumerator::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)

//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
#...
...1
//}


非数値の Range では、イテレーションに「要素 + s」を使用します。
(文字列またはシンボルの Range で s に数値を指定した場合を除きます)

//emlist[数値以外の Range に対する例][ruby]{
# Time の Range は each でイテレー...
...トできない
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).each { |t| p t }
# => 'Range#each': can't iterate from Time (TypeError)

# step は使用可能
(Time.utc(2024, 12, 25)...Time.utc(2024, 12, 26)).step(60*60*6) { |t| p t }
# => 2024-12-25 00:00:00 UTC
# 2024-12-25 06:00:00 UTC
#...

RubyVM::InstructionSequence#absolute_path -> String | nil (3101.0)

self が表す命令シーケンスの絶対パスを返します。

...ます。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello...
...puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"

@see RubyVM::InstructionSequence#path...

RubyVM::InstructionSequence#base_label -> String (3101.0)

self が表す命令シーケンスの基本ラベルを返します。

...す。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello...
...# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, world"
end

RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"

@see RubyVM::InstructionSequence#label...

RubyVM::InstructionSequence#disasm -> String (3101.0)

self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。

...ケンスを人間が読める形式の文字列に変換して返します。

puts RubyVM::InstructionSequence.compile('1 + 2').disasm

出力:

== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 (...
...1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave

@see RubyVM::InstructionSequence.disasm...

絞り込み条件を変える

RubyVM::InstructionSequence#disassemble -> String (3101.0)

self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。

...ケンスを人間が読める形式の文字列に変換して返します。

puts RubyVM::InstructionSequence.compile('1 + 2').disasm

出力:

== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 (...
...1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave

@see RubyVM::InstructionSequence.disasm...
<< < 1 2 3 4 5 ... > >>