399件ヒット
[1-100件を表示]
(0.038秒)
種類
- モジュール関数 (168)
- 変数 (154)
- インスタンスメソッド (77)
キーワード
-
$ ? (11) -
$ CHILD _ STATUS (11) -
$ FIELD _ SEPARATOR (11) -
$ FS (11) -
$ INPUT _ RECORD _ SEPARATOR (11) -
$ LAST _ MATCH _ INFO (11) -
$ LAST _ PAREN _ MATCH (11) -
$ MATCH (11) -
$ OUTPUT _ FIELD _ SEPARATOR (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
$ POSTMATCH (11) -
$ PREMATCH (11) -
$ RS (11) -
$ ~ (11) - Float (11)
- Rational (11)
- autoload (11)
- caller (33)
-
caller
_ locations (22) -
create
_ makefile (11) -
find
_ executable (11) -
find
_ library (22) - fork (22)
- loop (11)
- printf (22)
- rand (22)
-
try
_ static _ assert (22) - warn (3)
検索結果
先頭5件
- Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil - Kernel
$ $ LAST _ MATCH _ INFO -> MatchData | nil - Kernel
. # Float(arg , exception: true) -> Float | nil - Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil - Kernel
. # Rational(x , y = 1 , exception: true) -> Rational | nil
-
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (6426.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, nil)
# => ["/Users/user/......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
Kernel
$ $ LAST _ MATCH _ INFO -> MatchData | nil (6408.0) -
$~ の別名
...f=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 $LAST_MATCH_INFO[2] #=> nil
end... -
Kernel
. # Float(arg , exception: true) -> Float | nil (6326.0) -
引数を浮動小数点数(Float)に変換した結果を返します。
...引数を浮動小数点数(Float)に変換した結果を返します。
引数が数値の場合は素直に変換し、文字列の場合
は整数や浮動小数点数と見なせるもののみ変換します。
メソッド Float は文字列に対し String#to_f よりも厳密な変換を......た場合、
例外を発生する代わりに nil を返します。
@raise ArgumentError 整数や浮動小数点数と見なせない文字列を引数に指定した場合に発生します。
@raise TypeError nil またはメソッド to_f を持たないオブジェクトを......][ruby]{
p Float(4) #=> 4.0
p Float(4_000) #=> 4000.0
p Float(9.88) #=> 9.88
p Float(Time.gm(1986)) #=> 504921600.0
p Float(Object.new) # can't convert Object into Float (TypeError)
p Float(nil) # can't convert nil into Float (TypeError)
p Float("10") #... -
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (6326.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, nil)
# => ["/Users/user/......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
Kernel
. # Rational(x , y = 1 , exception: true) -> Rational | nil (6314.0) -
引数を有理数(Rational)に変換した結果を返します。
...引数を有理数(Rational)に変換した結果を返します。
@param x 変換対象のオブジェクトです。
@param y 変換対象のオブジェクトです。省略した場合は x だけを用いて
Rational オブジェクトを作成します。
@param exception false......に nil を返します。
@raise ArgumentError 変換できないオブジェクトを指定した場合に発生します。
引数 x、y の両方を指定した場合、x/y した Rational オブジェクトを
返します。
//emlist[例][ruby]{
Rational("1/3") # => (1/3)
Rational......。また、Kernel.#Integer とは違い "0x10" のような進数を表す接頭
辞を含めた指定は行えません。
//emlist[例][ruby]{
Rational("1/3") # => (1/3)
Rational("0.3") # => (3/10)
Rational('0.3E0') # => (3/10)
Rational('0.1E1/3') # => (1/3)
Rational('1.2/3... -
Kernel
$ $ CHILD _ STATUS -> Process :: Status | nil (6302.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
. # Float(arg) -> Float (6219.0) -
引数を浮動小数点数(Float)に変換した結果を返します。
...引数を浮動小数点数(Float)に変換した結果を返します。
引数が数値の場合は素直に変換し、文字列の場合
は整数や浮動小数点数と見なせるもののみ変換します。
メソッド Float は文字列に対し String#to_f よりも厳密な変換を......TypeError nil またはメソッド to_f を持たないオブジェクトを引数に指定したか、
to_f が浮動小数点数を返さなかった場合に発生します。
//emlist[例][ruby]{
p Float(4) #=> 4.0
p Float(4_000) #=> 4000.0
p Float(9.88)......at(Time.gm(1986)) #=> 504921600.0
p Float(Object.new) # can't convert Object into Float (TypeError)
p Float(nil) # can't convert nil into Float (TypeError)
p Float("10") #=> 10.0
p Float("10e2") #=> 1000.0
p Float("1e-2") #=> 0.01
p Float(".1") #=> 0.1
p Float... -
Kernel
. # Rational(x , y = 1) -> Rational (6207.0) -
引数を有理数(Rational)に変換した結果を返します。
...引数を有理数(Rational)に変換した結果を返します。
@param x 変換対象のオブジェクトです。
@param y 変換対象のオブジェクトです。省略した場合は x だけを用いて
Rational オブジェクトを作成します。
@raise ArgumentError......。また、Kernel.#Integer とは違い "0x10" のような進数を表す接頭
辞を含めた指定は行えません。
//emlist[例][ruby]{
Rational("1/3") # => (1/3)
Rational("0.3") # => (3/10)
Rational('0.3E0') # => (3/10)
Rational('0.1E1/3') # => (1/3)
Rational('1.2/3......される
Rational("0x10") # => ArgumentError
//}
引数に変換できないオブジェクトを指定した場合には ArgumentError が
発生します。
//emlist[例][ruby]{
Rational(Object.new) # => ArgumentError
Rational("") # => ArgumentError
Rational(nil) # =>... -
Kernel
# try _ static _ assert(expr , headers = nil , opt = "") -> bool (6203.0) -
@todo ???
@todo ???
...
@param expr C 言語の式を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。 -
Kernel
# try _ static _ assert(expr , headers = nil , opt = "") { . . . } -> bool (6203.0) -
@todo ???
@todo ???
...
@param expr C 言語の式を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。 -
Kernel
$ $ FIELD _ SEPARATOR -> String | nil (6203.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
$ $ INPUT _ RECORD _ SEPARATOR -> String | nil (6203.0) -
$/ の別名
...$/ の別名
require "English"
$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]
__END__
ugo|ego|fogo...