るりまサーチ

最速Rubyリファレンスマニュアル検索!
41件ヒット [1-41件を表示] (0.038秒)
トップページ > クエリ:IO[x] > クエリ:to_binary[x]

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

検索結果

RubyVM::InstructionSequence#to_binary(extra_data = nil) -> String (21113.0)

バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

...として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メ...
...はありません。 to_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num =...
...0\x00numE\x7F\x00\x00\x02\x00\x00\x00\x00
# \x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00+\xA0\x01\x00\x00\xAC\x01\x00
# \x00\xCA\x01\x00\x00\xD6\x01\x00\x00\xED\x01\x00\x00extra_data"
//}

@see RubyVM::InstructionSequence.load_from_binary
@see RubyVM::InstructionSequence.load_from_binary_extra_data...

RubyVM::InstructionSequence.load_from_binary(binary) -> RubyVM::InstructionSequence (3128.0)

RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。

...RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。

このローダーは検証機構をもっておらず、壊れたり改変されたバイナリを読み込むと深刻な問題を引き起...
...りません。自分が変換したバイナリデータを使うべきです。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
//}

@see RubyVM::InstructionSequence#to_binary...

RubyVM::InstructionSequence.load_from_binary_extra_data(binary) -> String (3012.0)

バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。

...埋め込まれたextra_dataを取り出します。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}

@see RubyVM::InstructionSequence#to_binary...

NEWS for Ruby 2.3.0 (102.0)

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

...うとして RuntimeError が発生したときにそのオブジェクトが生成された位置を表示します。
11725

* safe navigation operator (ぼっち演算子):
* object&.foo という形式のメソッド呼び出し形式が追加されました。これは object が ni...
...キュメントが追加されました
9098

=== 組み込みクラスの更新

* ARGF
* ARGF.read_nonblock は IO#read_nonblock と同じように `exception: false' オプションをサポートします
11358

* Array
* Array#bsearch_index を追加
10730
* Ar...
...的な問題を起こすことができます。
11788
* RubyVM::InstructionSequence#to_binary(extra_data = nil)
* RubyVM::InstructionSequence.load_from_binary(binary)
* RubyVM::InstructionSequence.load_from_binary_extra_data(binary)

* String
* フリーズされてい...

NEWS for Ruby 2.7.0 (18.0)

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

...omparable#clampや定数やDSLなどで便利かもしれません。
14799

//emlist[][ruby]{
ary[..3] # identical to ary[0..3]

case RUBY_VERSION
when ..."2.4" then puts "EOL"
# ...
end

age.clamp(..100)

where(sales: ..100)
//}

* 「$;」にnil以外の値を設定すると警告が出る...
...重代入でのrescue修飾子が単一の代入と同じ振る舞いになりました。 8279

//emlist[][ruby]{
a, b = raise rescue [1, 2]
# Previously parsed as: (a, b = raise) rescue [1, 2]
# Now parsed as: a, b = (raise rescue [1, 2])
//}

* 特異クラス構文での yield は警...
...した。
詳細はhttps://github.com/ruby/ruby/pull/2583を
参照してください。

* RubyVM::InstructionSequence
* RubyVM::InstructionSequence#to_binaryメソッドは
コンパイルされたバイナリを生成します。
そのバイナリサイズが削減...

絞り込み条件を変える