るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Kernel$$INPUT_LINE_NUMBER -> Integer (6201.0)

$. の別名

...$. の別名

1 e
2 f
3 g
4 h
5 i
# end of a.txt

r
equire "English"

File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb

r
uby sample.rb a.txt
#=> 5...

Kernel$$NR -> Integer (6201.0)

$. の別名

...$. の別名

1 e
2 f
3 g
4 h
5 i
# end of a.txt

r
equire "English"

File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb

r
uby sample.rb a.txt
#=> 5...

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

$+ の別名

...$+ の別名

r
equire "English"

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

while line = DATA.gets
[ r1, r2 ].each {|rep|
r
ep =~ line
p $+
}
end
__END__
<tr> <td><img src=http://localhost/a.jpg></td> <td>ikko...
...u</td> <td><a href=http://localhost/link.html>link</a></td> </tr>
#enf of sample.rb

$ ruby sample.rb
"http://localhost/a.jpg"
"link"...

Kernel$$ARGV -> [String] (6101.0)

$* の別名

...$* の別名

r
equire "English"
p $ARGV
# end of sample.rb

r
uby sample.rb 31 /home/hoge/fuga.txt
#=> ["31", "/home/hoge/fuga.txt"]...

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

$! の別名

...$! の別名

r
equire "English"
class SomethingError < StandardError; end

begin
r
aise SomethingError
r
escue
p $ERROR_INFO.backtrace #=> ["sample.rb:5"]
p $ERROR_INFO.to_s #=> "SomethingError"
end...

絞り込み条件を変える

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

$@ の別名

...$@ の別名

r
equire "English"
class SomethingError < StandardError; end

begin
r
aise SomethingError
r
escue
p $ERROR_POSITION #=> ["sample.rb:5"]
end...

Kernel$$FIELD_SEPARATOR -> String | nil (6101.0)

$; の別名

...$; の別名

r
equire "English"

str = "hoge,fuga,ugo,bar,foo"
p str.split #=> ["hoge,fuga,ugo,bar,foo"]
$FIELD_SEPARATOR = ","
p str.split #=> ["hoge", "fuga", "ugo", "bar", "foo"]...

Kernel$$IGNORECASE -> bool (6101.0)

過去との互換性のために残されていますが、もはや何の意味もありません。

...りません。

値は常に false です。代入しても無視されます。

$= の別名

r
equire "English"

$IGNORECASE = true # => warning: variable $= is no longer effective; ignored
$IGNORECASE # => warning: variable $= is no longer effective
# false...

Kernel$$INPUT_RECORD_SEPARATOR -> String | nil (6101.0)

$/ の別名

...$/ の別名

r
equire "English"

$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]

__END__
ugo|ego|fogo...
<< 1 2 3 ... > >>