るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.014秒)
トップページ > バージョン:2.4.0[x] > クエリ:Class[x] > 種類:変数[x]

別のキーワード

  1. argf.class lines
  2. argf.class each
  3. argf.class each_line
  4. class new
  5. argf.class gets

ライブラリ

モジュール

キーワード

検索結果

Kernel$$FILENAME -> String (52.0)

仮想ファイル Object::ARGF で現在読み込み中のファイル名です。 ARGF.class#filename と同じです。

仮想ファイル Object::ARGF で現在読み込み中のファイル名です。
ARGF.class#filename と同じです。

この変数はグローバルスコープです。

Kernel$$ERROR_INFO -> Exception | nil (22.0)

$! の別名

$! の別名

require "English"
class SomethingError < StandardError; end

begin
raise SomethingError
rescue
p $ERROR_INFO.backtrace #=> ["sample.rb:5"]
p $ERROR_INFO.to_s #=> "SomethingError"
end

Kernel$$ERROR_POSITION -> [String] | nil (22.0)

$@ の別名

$@ の別名

require "English"
class SomethingError < StandardError; end

begin
raise SomethingError
rescue
p $ERROR_POSITION #=> ["sample.rb:5"]
end