32件ヒット
[1-32件を表示]
(0.053秒)
別のキーワード
検索結果
先頭4件
-
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (18353.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で作られたバイナリデータ......)
iseq.to_binary("extra_data")
# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (12319.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
. 7 . 0 (360.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.6.0 以降の変更
=== 言語仕様の変更
==== パターンマッチ
* パターンマ......これは deprecated です。 15575
この警告は「-W:no-deprecated」オプションで止められます。
//emlist{
def foo
class << Object.new
yield #=> warning: `yield' in class syntax will not be supported from Ruby 3.0. 15575
end
end
foo { p :ok }
//}
* 引数を転......numerator.produce][ruby]{
require "date"
dates = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of dates
dates.detect(&:tuesday?) #=> next Tuesday
//}
//emlist[Enumerator::Lazy#eager][ruby]{
a = %w(foo bar baz)
e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager
p e.class... -
NEWS for Ruby 2
. 3 . 0 (174.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...s.ruby-lang.org の issue を参照してください。
== 2.2.0 以降の変更
=== 言語仕様の変更
* frozen-string-literal プラグマ:
* 実験的な機能として fronzen-string-literal というプラグマが導入されました。
8976
* さらに --enable/--disab......すことができます。
11788
* RubyVM::InstructionSequence#to_binary(extra_data = nil)
* RubyVM::InstructionSequence.load_from_binary(binary)
* RubyVM::InstructionSequence.load_from_binary_extra_data(binary)
* String
* フリーズされていない文字列を生......成するString#+@ を追加
* フリーズされた文字列を生成する String#-@ を追加
11782
* String.new に `encoding` オプションが追加されました
11785
* Struct
* Struct#dig を追加
11688
* Thread
* スレッド名を扱うために...