223件ヒット
[1-100件を表示]
(0.160秒)
ライブラリ
- ビルトイン (175)
- json (12)
- psych (24)
-
rdoc
/ context (12)
クラス
-
Encoding
:: Converter (24) -
Encoding
:: InvalidByteSequenceError (36) -
Enumerator
:: ArithmeticSequence (7) -
Psych
:: Nodes :: Sequence (24) -
RDoc
:: Context :: Section (12) - Range (14)
-
RubyVM
:: InstructionSequence (94)
モジュール
キーワード
- % (7)
-
absolute
_ path (12) - anchor (12)
-
base
_ label (12) -
destination
_ encoding _ name (12) - disasm (12)
- disassemble (12)
-
error
_ bytes (12) - inspect (19)
- label (12)
- path (12)
- putback (24)
-
readagain
_ bytes (12) - step (7)
- tag (12)
-
to
_ binary (10) -
to
_ json _ raw _ object (12)
検索結果
先頭5件
-
RDoc
:: Context :: Section # sequence -> String (21303.0) -
section のシーケンス番号を文字列で返します。
...section のシーケンス番号を文字列で返します。
リンクを作成する時に使われます。... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw _ object -> Hash (15113.0) -
生の文字列を格納したハッシュを生成します。
...UTF-8 の文字列ではなく生の文字列を JSON に変換する場合に使用してください。
require 'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"にほんご".encode("euc-jp").to_json......# source sequence is illegal/malformed (JSON::GeneratorError)... -
Encoding
:: InvalidByteSequenceError # destination _ encoding _ name -> String (12302.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::InvalidByteSequenceError#destination_encoding... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (12202.0) -
エラー発生時に捨てられたバイト列を返します。
...//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA1"
puts $!.re......adagain_bytes.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
Encoding
:: InvalidByteSequenceError # readagain _ bytes -> String (12202.0) -
エラー発生時に読み直さなければならないバイト列を返します。
...エラー発生時に読み直さなければならないバイト列を返します。
@see Encoding::InvalidByteSequenceError#error_bytes... -
Psych
:: Nodes :: Sequence # tag -> String|nil (9230.0) -
sequence に付加された tag を返します。
...sequence に付加された tag を返します。
@see Psych::Nodes::Sequence#tag=,
Psych::Nodes::Sequence.new... -
Enumerator
:: ArithmeticSequence # inspect -> String (9202.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。 -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (9202.0) -
self が表す命令シーケンスの絶対パスを返します。
...structionSequence.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::Instruct......ionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # inspect -> String (9202.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path...