るりまサーチ

最速Rubyリファレンスマニュアル検索!
253件ヒット [101-200件を表示] (0.428秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

検索結果

<< < 1 2 3 > >>

Kernel$$PREMATCH -> String | nil (27109.0)

$` の別名

...$` の別名

require "English"

str = 'hoge,foo,bar,hee,hoo'

/foo/ =~ str
p
$PREMATCH #=> "hoge,"...

Kernel$$PROCESS_ID -> Integer (27109.0)

$$ の別名

...$$ の別名

require "English"

p
sprintf("something%s", $PID) #=> "something5543" など...

Kernel$$OUTPUT_FIELD_SEPARATOR -> String | nil (24115.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 (24103.0)

$\ の別名

...$\ の別名

require "English"

p
rint "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
p
rint "fuge"
p
rint "ugo"
# end of sample.rb

ruby sample.rb
hoge
huga
fuge
ugo...

Kernel$$FS -> String | nil (24015.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 (24009.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 (24009.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 (21115.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 (21103.0)

$? の別名

...$? の別名

require "English"

out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`

if $CHILD_STATUS.to_i == 0
p
rint "wget success\n"
out.split(/\n/).each { |line|
p
rintf "%s\n", line
}
else
p
rint "wget failed\n"
end...

Kernel$$LAST_MATCH_INFO -> MatchData | nil (21021.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...

絞り込み条件を変える

<< < 1 2 3 > >>