319件ヒット
[101-200件を表示]
(0.433秒)
キーワード
-
$ " (11) -
$ -I (11) -
$ : (11) -
$ CHILD _ STATUS (11) -
$ DEFAULT _ INPUT (11) -
$ DEFAULT _ OUTPUT (11) -
$ ERROR _ INFO (11) -
$ ERROR _ POSITION (11) -
$ FIELD _ SEPARATOR (11) -
$ FS (11) -
$ IGNORECASE (11) -
$ INPUT _ RECORD _ SEPARATOR (11) -
$ LAST _ MATCH _ INFO (11) -
$ LAST _ PAREN _ MATCH (11) -
$ LOADED _ FEATURES (11) -
$ LOAD _ PATH (11) -
$ MATCH (11) -
$ NR (11) -
$ OFS (11) -
$ ORS (11) -
$ OUTPUT _ FIELD _ SEPARATOR (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
$ PID (11) -
$ POSTMATCH (11) -
$ PREMATCH (11) -
$ RS (11)
検索結果
先頭5件
-
Kernel
$ $ ERROR _ INFO -> Exception | nil (21008.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 (21008.0) -
$@ の別名
...$@ の別名
require "English"
class SomethingError < StandardError; end
begin
raise SomethingError
rescue
p $ERROR_POSITION #=> ["sample.rb:5"]
end... -
Kernel
$ $ FIELD _ SEPARATOR -> String | nil (21008.0) -
$; の別名
...$; の別名
require "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
$ $ FS -> String | nil (21008.0) -
$; の別名
...$; の別名
require "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 (21008.0) -
過去との互換性のために残されていますが、もはや何の意味もありません。
...りません。
値は常に false です。代入しても無視されます。
$= の別名
require "English"
$IGNORECASE = true # => warning: variable $= is no longer effective; ignored
$IGNORECASE # => warning: variable $= is no longer effective
# false... -
Kernel
$ $ INPUT _ LINE _ NUMBER -> Integer (21008.0) -
$. の別名
...$. の別名
1 e
2 f
3 g
4 h
5 i
# end of a.txt
require "English"
File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb
ruby sample.rb a.txt
#=> 5... -
Kernel
$ $ INPUT _ RECORD _ SEPARATOR -> String | nil (21008.0) -
$/ の別名
...$/ の別名
require "English"
$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]
__END__
ugo|ego|fogo... -
Kernel
$ $ LAST _ MATCH _ INFO -> MatchData | nil (21008.0) -
$~ の別名
...$~ の別名
require "English"
str = "<a href=https://www.ruby-lang.org/en/about/license.txt>license</a>"
if /<a href=(.+?)>/ =~ str
p $LAST_MATCH_INFO[0] #=> "<a href=https://www.ruby-lang.org/en/about/license.txt>"
p $LAST_MATCH_INFO[1] #=> "https://www.ruby-lang.org/en/about/lic... -
Kernel
$ $ LAST _ PAREN _ MATCH -> String | nil (21008.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>ikko... -
Kernel
$ $ MATCH -> String | nil (21008.0) -
$& の別名
...$& の別名
require "English"
str = 'hoge,foo,bar,hee,hoo'
/(foo|bar)/ =~ str
p $MATCH #=> "foo"...