44件ヒット
[1-44件を表示]
(0.032秒)
ライブラリ
- English (44)
モジュール
- Kernel (44)
キーワード
-
$ DEFAULT _ OUTPUT (11) -
$ INPUT _ LINE _ NUMBER (11) -
$ LAST _ READ _ LINE (11) -
$ NR (11)
検索結果
先頭4件
-
Kernel
$ $ LAST _ READ _ LINE -> String | nil (6108.0) -
$_ の別名
...$_ の別名
1 e
2 f
3 g
4 h
5 i
# end of a.txt
ruby -rEnglish -ne'p $LAST_READ_LINE' a.txt
#=>
"1 e\n"
"2 f\n"
"3 g\n"
"4 h\n"
"5 i\n"... -
Kernel
$ $ DEFAULT _ OUTPUT -> IO (7.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
$ $ INPUT _ LINE _ NUMBER -> Integer (7.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
$ $ NR -> Integer (7.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...