542件ヒット
[201-300件を表示]
(0.080秒)
別のキーワード
ライブラリ
- ビルトイン (328)
- json (12)
-
net
/ imap (118) - psych (72)
-
rdoc
/ context (12)
クラス
-
Encoding
:: Converter (96) -
Encoding
:: InvalidByteSequenceError (84) -
Enumerator
:: ArithmeticSequence (28) -
Net
:: IMAP (94) -
Net
:: IMAP :: FetchData (12) -
Net
:: IMAP :: ThreadMember (12) -
Psych
:: Handler (24) -
Psych
:: Nodes :: Sequence (48) -
RDoc
:: Context :: Section (12) - Range (14)
-
RubyVM
:: InstructionSequence (106)
モジュール
キーワード
- % (7)
-
absolute
_ path (12) - anchor (12)
-
base
_ label (12) - begin (7)
- copy (12)
-
destination
_ encoding (12) -
destination
_ encoding _ name (12) - disasm (12)
- disassemble (12)
-
error
_ bytes (12) - expunge (12)
-
first
_ lineno (12) - hash (7)
-
incomplete
_ input? (12) - inspect (19)
- label (12)
-
last
_ error (12) - move (10)
- path (12)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - putback (24)
-
readagain
_ bytes (12) - search (12)
- seqno (24)
- size (7)
- sort (12)
-
source
_ encoding (12) -
source
_ encoding _ name (12) -
start
_ mapping (12) -
start
_ sequence (12) - step (7)
- store (12)
- style (12)
- tag (12)
- tag= (12)
-
to
_ binary (10) -
to
_ json _ raw _ object (12) -
uid
_ sort (12) -
uid
_ thread (12)
検索結果
先頭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...