るりまサーチ

最速Rubyリファレンスマニュアル検索!
72件ヒット [1-72件を表示] (0.113秒)

別のキーワード

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

ライブラリ

キーワード

検索結果

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

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

...ence:<compiled>@<compiled>>
iseq.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, world"
end

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

@
see RubyVM::InstructionSequence#base_label...

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

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

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

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

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

@
see Thread::Backtrace::Location#base_label...

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

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

...race::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...
...ialize
# new
# <main>
//}

@
see Thread::Backtrace::Location#label...

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

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

...<compiled>@<compiled>>
iseq.base_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.base_label # => "<m...
...ain>"

例3:

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

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

@
see RubyVM::InstructionSequence#label...

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

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

...:Tms#real
: %n
ラベルで置き換えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label

@
param fmtstr フォーマット文字列です。
省略された場合は、Benchmark::Tms::FORMAT が使用されます。
@
param args フォーマットされる引数です。...

絞り込み条件を変える

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

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

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

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

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