60件ヒット
[1-60件を表示]
(0.015秒)
別のキーワード
種類
- インスタンスメソッド (48)
- 文書 (12)
ライブラリ
- ビルトイン (48)
クラス
-
ARGF
. class (12) -
Thread
:: Backtrace :: Location (36)
キーワード
-
absolute
_ path (12) -
base
_ label (12) -
ruby 1
. 8 . 4 feature (12) -
to
_ s (12)
検索結果
先頭5件
-
ARGF
. class # skip -> self (18224.0) -
現在開いている処理対象のファイルをクローズします。 次回の読み込みは次の引数が処理対象になります。 self を返します。
...いている処理対象のファイルをクローズします。
次回の読み込みは次の引数が処理対象になります。
self を返します。
$ echo "foo" > foo
$ echo "bar" > bar
$ ruby argf.rb foo bar
ARGF.filename # => "foo"
ARGF.skip
ARGF.filename # => "bar"... -
Thread
:: Backtrace :: Location # absolute _ path -> String (28.0) -
self が表すフレームの絶対パスを返します。
...
self が表すフレームの絶対パスを返します。
//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.absolute_path
end
# => /path/to/foo.rb
# /path... -
Thread
:: Backtrace :: Location # base _ label -> String (28.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)... -
Thread
:: Backtrace :: Location # to _ s -> String (28.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
...
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し
ます。
//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.to_s
end... -
ruby 1
. 8 . 4 feature (12.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...super
end
end
class Bar
include Foo
def initialize
Foo.instance_method(:initialize).bind(self).call
end
end
Bar.new
# => ruby 1.8.3 (2005-09-21) [i686-linux]
-:3:in `initialize': method `initi......e.basename [change]
: File.dirname [change]
#Tue Nov 22 14:46:57 2005 NAKAMURA Usaku <usa@ruby-lang.org>
#
# * file.c (rb_file_s_basename): skip slashes just after UNC top slashes.
#
# * test/ruby/test_path.rb (test_dirname, test_basename): follow new
# spec. and add new tests...