るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.084秒)
トップページ > バージョン:2.7.0[x] > クエリ:String[x] > クエリ:tr[x] > クエリ:label[x]

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

ライブラリ

モジュール

キーワード

検索結果

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

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

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

トップレベルでは "<main>" を返します。self を文字列から作成していた場合
は "<compiled>" を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"

例2: R...

Thread::Backtrace::Location#label -> String (63943.0)

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

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

例: Thread::Backtrace::Location の例1を用いた例

//emlist[][ruby]{
loc = c(0..1).first
loc.label # => "a"
//}

@see Thread::Backtrace::Location#base_label

Benchmark::Tms#label -> String (54907.0)

ラベル。

ラベル。

Thread::Backtrace::Location#base_label -> String (27991.0)

self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。

self が表すフレームの基本ラベルを返します。通常、
Thread::Backtrace::Location#label から修飾を取り除いたもので構成
されます。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.base_label
end

# => init...

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

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

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

例1:irb で実行した場合

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

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

# /tmp/method.rb
def hello
puts "h...

絞り込み条件を変える

RubyVM::InstructionSequence#inspect -> String (9622.0)

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

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

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

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

Benchmark::Tms#format(fmtstr = nil, *args) -> String (922.0)

self を指定されたフォーマットで整形して返します。

self を指定されたフォーマットで整形して返します。

このメソッドは Kernel.#format のようにオブジェクトを整形しますが、
以下の拡張を使用することができます。

: %u
user 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
子プロセスの s...

Ripper.lex(src, filename = &#39;-&#39;, lineno = 1) -> [[Integer, Integer], Symbol, String, Ripper::Lexer::State] (640.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...

UncaughtThrowError#to_s -> String (640.0)

self を tag を含む文字列表現にして返します。

self を tag を含む文字列表現にして返します。

//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label
end

begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.to_s # => "uncaught throw :uncaught_label"
end
//}

Benchmark::FORMAT -> String (622.0)

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

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

: %u
user 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
t...

絞り込み条件を変える

Benchmark::Tms::FORMAT -> String (622.0)

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

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

: %u
user 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
t...