るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. _builtin i

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

RubyVM::InstructionSequence#label -> String (24225.0)

self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。

..."<main>" を返します。self を文字列から作成していた場合
は "<compiled>" を返します。

例1:irb で実行した場合

i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
i
seq.label
# => "<compiled>"...
...例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, worl...
...d"
end

RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"

@see RubyVM::InstructionSequence#base_label...

RubyVM::InstructionSequence#base_label -> String (12225.0)

self が表す命令シーケンスの基本ラベルを返します。

...ラベルを返します。

例1:irb で実行した場合

i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
i
seq.base_label
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/me...
...# 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#inspect -> String (12206.0)

self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。

...んだ人間に読みやすい文字列にして返します。

//emlist[例][ruby]{
i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
i
seq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}

@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path...

RubyVM::InstructionSequence#to_a -> Array (6106.0)

self の情報を 14 要素の配列にして返します。

...す。

: magic

データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。

: major_version

命令シーケンスのメジャーバージョン。

: minor_version

命令シーケンスのマイナーバージョン。

: format_type

データ...
...常に 1。

: misc

以下の要素から構成される Hash オブジェクト。

:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。

:local_size: ローカル変数の総数 + 1。

:stack_max: スタックの深さ。(SystemStackError を...
...検出するために使用)

: #label

メソッド名、クラス名、モジュール名などで構成される命令シーケンスのラ
ベル。トップレベルでは "<main>"。文字列から作成していた場合は
"<compiled>"。

: #path

命令シーケンスの相対パ...

Ripper.lex(src, filename = &#39;-&#39;, lineno = 1) -> [[Integer, Integer], Symbol, String, Ripper::Lexer::State] (3206.0)

Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。

...Ruby プログラム str をトークンに分割し、そのリストを返します。
ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。

@param src Ruby プログラムを文字列か IO オブジェクトで指定します。

@param filename src...
...ます。

@param lineno src の開始行番号を指定します。省略すると 1 になります。



//emlist[][ruby]{
require 'ripper'

pp Ripper.lex("def m(a) nil end")
# => [[[1, 0], :on_kw, "def", EXPR_FNAME],
# [[1, 3], :on_sp, " ", EXPR_FNAME],
# [[1, 4], :on_ident, "m", EXPR_EN...
...ren, "(", EXPR_BEG|EXPR_LABEL],
# [[1, 6], :on_ident, "a", EXPR_ARG],
# [[1, 7], :on_rparen, ")", EXPR_ENDFN],
# [[1, 8], :on_sp, " ", EXPR_BEG],
# [[1, 9], :on_kw, "nil", EXPR_END],
# [[1, 12], :on_sp, " ", EXPR_END],
# on_kw, "end", EXPR_END
//}


Ripper.lex は分割した...
...ります。

@param lineno src の開始行番号を指定します。省略すると 1 になります。




//emlist[][ruby]{
require 'ripper'

pp Ripper.lex("def m(a) nil end")
# => [[[1, 0], :on_kw, "def", FNAME],
# [[1, 3], :on_sp, " ", FNAME],
# [[1, 4], :on_ident, "m", ENDFN],
#...
...[[1, 5], :on_lparen, "(", BEG|LABEL],
# [[1, 6], :on_ident, "a", ARG],
# [[1, 7], :on_rparen, ")", ENDFN],
# [[1, 8], :on_sp, " ", BEG],
# [[1, 9], :on_kw, "nil", END],
# [[1, 12], :on_sp, " ", END],
# on_kw, "end", END
//}

Ripper.lex は分割したトークンを詳しい...

絞り込み条件を変える

Ripper.lex(src, filename = &#39;-&#39;, lineno = 1, raise_errors: false) -> [[Integer, Integer], Symbol, String, Ripper::Lexer::State] (3206.0)

Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。

...Ruby プログラム str をトークンに分割し、そのリストを返します。
ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。

@param src Ruby プログラムを文字列か IO オブジェクトで指定します。

@param filename src...
...

@param lineno src の開始行番号を指定します。省略すると 1 になります。

@param raise_errors true を指定すると、src にエラーがある場合に例外(SyntaxError)を発生させます。省略すると false になります。

@raise SyntaxError raise_errors が...
...発生します。



//emlist[][ruby]{
require 'ripper'

pp Ripper.lex("def m(a) nil end")
# => [[[1, 0], :on_kw, "def", FNAME],
# [[1, 3], :on_sp, " ", FNAME],
# [[1, 4], :on_ident, "m", ENDFN],
# [[1, 5], :on_lparen, "(", BEG|LABEL],
# [[1, 6], :on_ident, "a", ARG],
# [[1, 7],...

ruby 1.8.4 feature (3156.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...ruby 1.8.4 feature
ruby 1.8.4 での ruby 1.8.3 からの変更点です。

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。...
...by]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only...
...by-1.8.3 で enbug し
ていたもの) を修正しました.

# * ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb,
# ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb,
# ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb,
# ext/tk/lib/tk/lis...

NEWS for Ruby 3.0.0 (3054.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now...
...ring literals are no longer frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label...

NEWS for Ruby 2.3.0 (3036.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
....ruby-lang.org の issue を参照してください。

== 2.2.0 以降の変更

=== 言語仕様の変更

* frozen-string-literal プラグマ:
* 実験的な機能として fronzen-string-literal というプラグマが導入されました。
8976
* さらに --enable/--disabl...
...* https://github.com/ruby/rdoc/blob/master/History.rdoc#421--2015-12-22

* RubyGems
* RubyGems 2.5.1 に更新しました。
* http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.0+-2F+2015-11-03
* http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.1+-2F+20...

NEWS for Ruby 2.0.0 (3024.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
*...
...* 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::InstructionSeq...

絞り込み条件を変える

Benchmark.#benchmark(caption = "", label_width = nil, fmtstr = nil, *labels) {|rep| ...} -> [Benchmark::Tms] (343.0)

Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。

...の配列を返した場合は、
それらの数値も追加の行に表示されます。

@param caption レポートの一行目に表示する文字列を指定します。
@param label_width ラベルの幅を指定します。
@param fmtstr フォーマット文字列を指定しま...
...m labels ブロックが Benchmark::Tms オブジェクトの配列を返す場合に指定します。

=== フォーマット文字列

フォーマット文字列として以下が使用できます。

: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU tim...
...換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの system CPU time で置き換えられます。Benchmark::Tms#cstime
: %t
total CPU time で置き換えられ...

Benchmark::FORMAT -> String (136.0)

Benchmark.#benchmark の第三引数のデフォルト値。

...r CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの system CPU time で...
...れます。Benchmark::Tms#cstime
: %t
total CPU time で置き換えられます。Benchmark::Tms#total
: %r
実経過時間で置き換えられます。Benchmark::Tms#real
: %n
ラベルで置き換えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label

上記のフォーマット...
...文字列を使用しています。
この定数の内容は以下の通りです。

//emlist[][ruby]{
"%10.6u %10.6y %10.6t %10.6r\n"
//}

@see Benchmark.#benchmark, Benchmark::Tms::FORMAT...
<< 1 2 > >>