るりまサーチ

最速Rubyリファレンスマニュアル検索!
55件ヒット [1-55件を表示] (0.053秒)
トップページ > クエリ:IO[x] > クエリ:io[x] > クエリ:base_label[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each_line
  4. io each
  5. io readlines

ライブラリ

キーワード

検索結果

RubyVM::InstructionSequence#base_label -> String (24119.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/method.rb
def h...
...# 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...

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

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

...ktrace::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

# => in...
...itialize
# new
# <main>
//}

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

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

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

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

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

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

# irb
> iseq = RubyVM::Instruction...
...Sequence.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 (6006.0)

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

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

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

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

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

NEWS for Ruby 2.0.0 (210.0)

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

...警告しなくなりました

=== 組み込みクラスの更新

* ARGF.class
* 追加: ARGF.class#codepoints, ARGF.class#each_codepoint
IO
にある同名のメソッドに対応します

* Array
* 追加: Array#bsearch 二分探索します
* 非互換:
* Array#shuf...
...に似ています
* 拡張: Hash#default_proc= default proc をクリアするために nil を渡せるようになりました

* IO
* 非推奨: IO#lines, #bytes, #chars, #codepoints

* Kernel
* 追加: Kernel.#Hash という変換メソッド。Kernel.#Array, Kernel.#Float に...
...ソースファイル(__FILE__)のあるディレクトリ名を正規化された絶対パ スで返します。
* 追加: Kernel.#caller_locations フレーム情報の配列を返します
* 拡張: Kernel.#warn Kernel.#puts のように複数の引数を受け付けるようになりま...

絞り込み条件を変える