クラス
- BasicObject (12)
- Encoding (48)
- Object (12)
- WIN32OLE (12)
モジュール
- Kernel (300)
キーワード
-
$ ARGV (12) -
$ CHILD _ STATUS (12) -
$ DEFAULT _ INPUT (12) -
$ DEFAULT _ OUTPUT (12) -
$ ERROR _ INFO (12) -
$ ERROR _ POSITION (12) -
$ FIELD _ SEPARATOR (12) -
$ FS (12) -
$ IGNORECASE (12) -
$ INPUT _ LINE _ NUMBER (12) -
$ INPUT _ RECORD _ SEPARATOR (12) -
$ LAST _ MATCH _ INFO (12) -
$ LAST _ PAREN _ MATCH (12) -
$ LAST _ READ _ LINE (12) -
$ MATCH (12) -
$ NR (12) -
$ OFS (12) -
$ ORS (12) -
$ OUTPUT _ FIELD _ SEPARATOR (12) -
$ OUTPUT _ RECORD _ SEPARATOR (12) -
$ PID (12) -
$ POSTMATCH (12) -
$ PREMATCH (12) -
$ PROCESS _ ID (12) -
$ RS (12) -
NEWS for Ruby 3
. 0 . 0 (5) -
SCRIPT
_ LINES _ _ (12) -
SJIS
_ DOCOMO (12) -
SJIS
_ DoCoMo (12) -
UTF8
_ DOCOMO (12) -
UTF8
_ DoCoMo (12) - locale= (12)
-
method
_ missing (12)
検索結果
先頭5件
-
English (38006.0)
-
特殊変数 $! などに英語名の別名 ($ERROR_INFO など)をつけます。
...特殊変数 $! などに英語名の別名 ($ERROR_INFO など)をつけます。
例:
p $/ #=> "\n"
p $RS #=> nil
require 'English'
p $RS #=> "\n"... -
Kernel
$ $ ARGV -> [String] (8006.0) -
$* の別名
...$* の別名
require "English"
p $ARGV
# end of sample.rb
ruby sample.rb 31 /home/hoge/fuga.txt
#=> ["31", "/home/hoge/fuga.txt"]... -
Kernel
$ $ CHILD _ STATUS -> Process :: Status | nil (8006.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
$ $ DEFAULT _ INPUT -> IO (8006.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
$ $ DEFAULT _ OUTPUT -> IO (8006.0) -
$> の別名
...$> の別名
require "English"
dout = $DEFAULT_OUTPUT.dup
$DEFAULT_OUTPUT.reopen("out.txt", "w")
print "foo"
$DEFAULT_OUTPUT.close
$DEFAULT_OUTPUT = dout
p "bar" # => bar
p File.read("out.txt") #=> foo... -
Kernel
$ $ ERROR _ INFO -> Exception | nil (8006.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 (8006.0) -
$@ の別名
...$@ の別名
require "English"
class SomethingError < StandardError; end
begin
raise SomethingError
rescue
p $ERROR_POSITION #=> ["sample.rb:5"]
end... -
Kernel
$ $ FIELD _ SEPARATOR -> String | nil (8006.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 (8006.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"]...