253件ヒット
[101-200件を表示]
(0.516秒)
モジュール
- Kernel (253)
キーワード
-
$ ARGV (11) -
$ CHILD _ STATUS (11) -
$ DEFAULT _ INPUT (11) -
$ DEFAULT _ OUTPUT (11) -
$ ERROR _ INFO (11) -
$ ERROR _ POSITION (11) -
$ FIELD _ SEPARATOR (11) -
$ FS (11) -
$ INPUT _ LINE _ NUMBER (11) -
$ INPUT _ RECORD _ SEPARATOR (11) -
$ LAST _ MATCH _ INFO (11) -
$ LAST _ PAREN _ MATCH (11) -
$ LAST _ READ _ LINE (11) -
$ MATCH (11) -
$ NR (11) -
$ OFS (11) -
$ OUTPUT _ FIELD _ SEPARATOR (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
$ PID (11) -
$ PREMATCH (11) -
$ PROCESS _ ID (11) -
$ RS (11)
検索結果
先頭5件
-
Kernel
$ $ PREMATCH -> String | nil (27108.0) -
$` の別名
...$` の別名
require "English"
str = 'hoge,foo,bar,hee,hoo'
/foo/ =~ str
p $PREMATCH #=> "hoge,"... -
Kernel
$ $ PROCESS _ ID -> Integer (27108.0) -
$$ の別名
...$$ の別名
require "English"
p sprintf("something%s", $PID) #=> "something5543" など... -
Kernel
$ $ OUTPUT _ FIELD _ SEPARATOR -> String | nil (24114.0) -
$, の別名
...$, の別名
require "English"
array = %w|hoge fuga ugo bar foo|
p array.join #=> "hogefugaugobarfoo"
$OUTPUT_FIELD_SEPARATOR = ","
p array.join #=> "hoge,fuga,ugo,bar,foo"... -
Kernel
$ $ OUTPUT _ RECORD _ SEPARATOR -> String | nil (24102.0) -
$\ の別名
...$\ の別名
require "English"
print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb
ruby sample.rb
hoge
huga
fuge
ugo... -
Kernel
$ $ FS -> String | nil (24014.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
$ $ NR -> Integer (24008.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
$ $ RS -> String | nil (24008.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
$ $ ERROR _ INFO -> Exception | nil (21114.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
$ $ CHILD _ STATUS -> Process :: Status | nil (21102.0) -
$? の別名
...$? の別名
require "English"
out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`
if $CHILD_STATUS.to_i == 0
print "wget success\n"
out.split(/\n/).each { |line|
printf "%s\n", line
}
else
print "wget failed\n"
end... -
Kernel
$ $ LAST _ MATCH _ INFO -> MatchData | nil (21020.0) -
$~ の別名
...uire "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/license.txt"
p $LAS...