別のキーワード
種類
- 文書 (46)
- インスタンスメソッド (33)
- 特異メソッド (19)
ライブラリ
- ビルトイン (52)
クラス
モジュール
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
base
_ label (11) -
first
_ lineno (11) - label (11)
検索結果
先頭5件
- RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence - RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: InstructionSequence # base _ label -> String
-
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (21308.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...クトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSe......ding@(irb)>
# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/iseq_of.rb
def hello
puts "hello, world"
end
$a_global_......}
# irb
> require '/tmp/iseq_of.rb'
# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>
# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSequence:0x007fb73d7... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (21228.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:he... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (21228.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:he... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (21226.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:he... -
RubyVM
:: InstructionSequence # base _ label -> String (3042.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/me......end
# 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#la... -
RubyVM
:: InstructionSequence # label -> String (3042.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...<compiled>" を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/meth......end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"
@see RubyVM::InstructionSequence#base_label... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (3018.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
...の 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2... -
NEWS for Ruby 2
. 0 . 0 (126.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...再帰的なマーキングを導入しました。期待しないスタックオーバーフローを避けるためです
* GC::Profiler
* 追加: GC::Profiler.raw_data GCの加工していないプロファイルデータを返します
* Hash
* 追加: Hash#to_h 明示的に変換......索
* RubyVM (MRI specific)
* 追加: RubyVM::InstructionSequence.of to get the instruction sequence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#label,
RubyVM::Instruct......ionSequence#base_label,
RubyVM::InstructionSequence#first_lineno to retrieve information from where
the instruction sequence was defined.
* スタックの使用量を指定するための環境変数を追加(起動時にチェックします):
* RUBY_THREAD_VM_STACK_SIZE: vm... -
NEWS for Ruby 2
. 7 . 0 (48.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...れます。
_1 = 0 #=> warning: `_1' is reserved for numbered parameter; consider another name
[1].each { p _1 } # prints 0 instead of 1
==== ブロックなしの proc/lambda が deprecated
* ブロック付きで呼び出されたメソッドの中で、ブロックなしでPr......警告を止める例:
//emlist{
$ ruby -e '0 in a'
-e:1: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!
$ ruby -W:no-experimental -e '0 in a'
//}
* RUBYOPTで両方止めるにはスペース区切りで指定します:
//emlist{
$ RUBYOPT='......(Ruby 2.6ではString以外の全ての型でRange#include?から変更されていました。)
15449
* RubyVM
* 削除されたメソッド
* RubyVM.resolve_feature_pathが$LOAD_PATH.resolve_feature_pathに移動しました。
15903 15230
* String
* Unic... -
NEWS for Ruby 2
. 3 . 0 (42.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...で開いているときのみ効果があります。
11218
* `flags` オプションの追加。
this parameter is bitwise-ORed to oflags generated by normal mode argument.
11253
* IO#advise はもはや Errno::ENOSYS を起こしません。
サポートの有無......めに Queue#close(Thread::Queue#close) を追加
10600
* Regexp/String: Unicode のバージョンを 7.0.0 から 8.0.0 に更新
* RubyVM::InstructionSequence
* 実験的な機能としてiseqローダー用の低レベルな操作をするメソッドをいくつか追加......簡単に致命的な問題を起こすことができます。
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
. 6 . 0 (42.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* Update Emoji version from 5.0 to 11.0.0 14802
* RubyVM::AbstractSyntaxTree
* 新規メソッド
* RubyVM::AbstractSyntaxTree.parse は文字列をパースして AST ノードを返します。 [実験的]
* RubyVM::AbstractSyntaxTree.parse_file はファイルをパー......スして AST ノードを返します。 [実験的]
* RubyVM::AbstractSyntaxTree.of は proc やメソッドに対応する AST ノードを返します。 [実験的]
* RubyVM
* 新規メソッド
* RubyVM.resolve_feature_path は "require(feature)" で読み込むファイル......IT コンパイラはインタプリタをビルドするのに使用した C コンパイラを使用します。
現在は GCC, Clang, Microsoft Visual C++ をサポートしています。
* configure に「--disable-mjit-support」オプションが追加されました。
これ... -
NEWS for Ruby 2
. 5 . 0 (36.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ub.com/k-takata/Onigmo/issues/82
* Support new 5 emoji-related Unicode character properties
* RubyVM::InstructionSequence
* RubyVM::InstructionSequence#each_child を追加
* RubyVM::InstructionSequence#trace_points を追加
* String
* String#-@ はフリーズされてい......* Preserve time zone offset when deserializing times
https://github.com/ruby/psych/pull/316
* Remove deprecated method aliases for syck gem
https://github.com/ruby/psych/pull/312
* rbconfig
* RbConfig::LIMITS is added to provide the limits of C types.
This is......available when rbconfig/sizeof is loaded.
* ripper
* Ripper::EXPR_BEG and so on for Ripper#state.
* Ripper#state を追加。スキャナーの状態を伝えるためです。13686
* rdoc
* RDoc 6.0.1 に更新
* Replace IRB based lexer with Ripper.
* https://github.... -
NEWS for Ruby 2
. 4 . 0 (18.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...た https://github.com/k-takata/Onigmo/issues/82
* Regexp/String: Unicodeのバージョンを8.0.0から9.0.0に更新しました 12513
* RubyVM::Env
* 削除しました
* String
* String#casecmp? を追加 12786
* String#concat, String#prepend 複数の引数を受け付け......0.class # => Integer
Fixnum # => Integer
Bignum # => Integer
# 以下の2つは同じ
obj.kind_of?(Fixnum)
obj.kind_of?(Integer)
/* Cレベルでは以下の2つを使ってFixnumとBignumを区別すべき */
FIXNUM_P(obj)
RB_...