るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. _builtin <
  2. bigdecimal <
  3. float <
  4. module <
  5. complex <

ライブラリ

モジュール

キーワード

検索結果

Kernel$$< -> IO (18304.0)

すべての引数または標準入力で構成される仮想ファイルです。 定数 Object::ARGF の別名です。

すべての引数または標準入力で構成される仮想ファイルです。
定数 Object::ARGF の別名です。

この変数はグローバルスコープ、読み取り専用です。

Kernel$$LAST_PAREN_MATCH -> String | nil (76.0)

$+ の別名

$+ の別名

require "English"

r1 = Regexp.compile("<img src=(http:.+?)>")
r2 = Regexp.compile("<a href=(http|ftp).+?>(.+?)</a>")

while line = DATA.gets
[ r1, r2 ].each {|rep|
rep =~ line
p $+
}
end
__END__
<tr> <td><img src=http://localhost/a.jpg></td> <td>ikkou</td>...

Kernel$$DEFAULT_INPUT -> IO (22.0)

$< の別名

$< の別名

require "English"
while line = $DEFAULT_INPUT.gets
p line
end
# end of sample.rb

ruby sample.rb < /etc/passwd
# => "hoge:x:500:501::/home/hoge:/bin/bash\n"
...

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

絞り込み条件を変える