るりまサーチ

最速Rubyリファレンスマニュアル検索!
912件ヒット [1-100件を表示] (0.157秒)
トップページ > クエリ:i[x] > 種類:変数[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Kernel$$INPUT_LINE_NUMBER -> Integer (12307.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$$LAST_READ_LINE -> String | nil (6213.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$$CHILD_STATUS -> Process::Status | nil (6207.0)

$? の別名

...$? の別名

require "English"

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

i
f $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$$INPUT_RECORD_SEPARATOR -> String | nil (6201.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$$-i -> String | nil (6126.0)

in-place 置換モードで用いられます。

...in-place 置換モードで用いられます。

コマンドラインオプション -i を指定したとき、空文字列になります。
-i オプションに拡張子を渡した場合にはその拡張子が文字列として格納されます。

-i オプションが指定されていな...
...い時の値は nil です。

スクリプト内で $-i に代入することもでき、
その場合は Object::ARGV の次の
ファイルを読み込み始めるタイミングで in-place 置換を開始します。

この変数はグローバルスコープです。

@see spec/rubycmd...

絞り込み条件を変える

Kernel$$-I -> [String] (6120.0)

Rubyライブラリをロードするときの検索パスです。

...す。

Kernel.#load や Kernel.#require
がファイルをロードする時に検索するディレクトリのリストを含む配列です。

起動時にはコマンドラインオプション -I で指定したディレクトリ、
環境変数 RUBYLIB の値、
コンパイル時に指定...
...下に典型的な UNIX システム上でのロードパスを示します。

-I で指定したパス
環境変数 RUBYLIB の値
/usr/local/lib/ruby/site_ruby/VERSION サイト固有、バージョン依存のライブラリ
/usr/local/lib/ruby/site_ruby/VERSION/ARCH サイト...
...ラリ
/usr/local/lib/ruby/site_ruby サイト固有ライブラリ
/usr/local/lib/ruby/VERSION 標準ライブラリ
/usr/local/lib/ruby/VERSION/ARCH 標準、システム依存、拡張ライブラリ

上記表中の VERSION は Ruby のバージ...

Kernel$$NR -> Integer (6107.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$$DEFAULT_INPUT -> IO (6101.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$$ERROR_INFO -> Exception | nil (6101.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 (6101.0)

$@ の別名

...$@ の別名

require "English"
class SomethingError < StandardError; end

begin
raise SomethingError
rescue
p $ERROR_POSITION #=> ["sample.rb:5"]
end...

絞り込み条件を変える

<< 1 2 3 ... > >>