るりまサーチ

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

別のキーワード

  1. irb/cmd/subirb execute
  2. irb/input-method new
  3. irb/input-method gets
  4. irb/cmd/load execute
  5. irb/cmd/pushws execute

クラス

キーワード

検索結果

Binding#irb -> object (18128.0)

REPLのセッションを開始します。

...REPLのセッションを開始します。

2.5.0 からは require 'irb' せずに直接 binding.irb を呼び出しても使えるようになりました。

@
see irb...

Thread#report_on_exception -> bool (45.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...終了した時に、その内容を $stderr に報告します。

デフォルトはスレッド作成時の Thread.report_on_exception です。

@
param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//e...
...=> true
a.run
# => #<Thread:0x00007fc3f48c7908@(irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }...
...b.report_on_exception = false
b.run # => #<Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}

@
see Thread.report_on_exception...

Thread#report_on_exception=(newstate) (45.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...終了した時に、その内容を $stderr に報告します。

デフォルトはスレッド作成時の Thread.report_on_exception です。

@
param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//e...
...=> true
a.run
# => #<Thread:0x00007fc3f48c7908@(irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }...
...b.report_on_exception = false
b.run # => #<Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}

@
see Thread.report_on_exception...

Thread#name=(name) -> String (27.0)

self の名前を name に設定します。

...

@
raise ArgumentError 引数に ASCII 互換ではないエンコーディングのものを
指定した場合に発生します。

//emlist[例][ruby]{
a = Thread.new{}
a.name = 'named'
a.name # => "named"
a.inspect # => "#<Thread:0x00007f85ac8721f0@named@(irb):1 d...
...ead>"
//}

@
see Thread#name...

RubyVM::InstructionSequence#absolute_path -> String | nil (21.0)

self が表す命令シーケンスの絶対パスを返します。

...self を文字列から作成していた場合は nil を返します。

例1:irb で実行した場合

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

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

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

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

@
see RubyVM::InstructionSequence#path...

絞り込み条件を変える

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

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

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

例1:irb で実行した場合

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

例2: RubyVM::InstructionSequence.co...
...llo, world"
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::Instructi...

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

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

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

例1:irb で実行した場合

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

例2: RubyVM::InstructionSequence.comp...
...s "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::InstructionSeq...

RubyVM::InstructionSequence#path -> String (21.0)

self が表す命令シーケンスの相対パスを返します。

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

例1:irb で実行した場合

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

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

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

# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"

@
see RubyVM::InstructionSequence#absolute_path...