るりまサーチ

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

別のキーワード

  1. ripper warning
  2. syslog warning
  3. rubygems/user_interaction alert_warning
  4. warning warn
  5. testtask warning

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 > >>

Syslog::Logger#error? -> bool (17.0)

self が ERROR 以上の(syslog の warning)ログレベルのメッセージを記録する 場合に true を返します。

...self が ERROR 以上の(syslog の warning)ログレベルのメッセージを記録する
場合に true を返します。...

Module#const_set(name, value) -> object (13.0)

モジュールに name で指定された名前の定数を value とい う値として定義し、value を返します。

...abc')
Foo::BAR # => "abc"

# 既に定義されている定数の名前を指定した場合
Foo.const_set('BAR', '123')
# warning: already initialized constant Foo::BAR
# warning: previous definition of BAR was here
# => "123"

# 不適切な定数名を指定した場合
Foo.const_set('foo', 1) #...

Hash#fetch(key) -> object (7.0)

key に関連づけられた値を返します。該当するキーが登録されてい ない時には、引数 default が与えられていればその値を、ブロッ クが与えられていればそのブロックを評価した値を返します。

...ey|"#{key} not exist"} #=> "two not exist"
p h.fetch(:two, "error"){|key| #=> "two not exist"
"#{key} not exist" # warning: block supersedes default value argument
} # 警告が表示される。

h.default = "default"
p h.fetc...

Hash#fetch(key) {|key| ... } -> object (7.0)

key に関連づけられた値を返します。該当するキーが登録されてい ない時には、引数 default が与えられていればその値を、ブロッ クが与えられていればそのブロックを評価した値を返します。

...ey|"#{key} not exist"} #=> "two not exist"
p h.fetch(:two, "error"){|key| #=> "two not exist"
"#{key} not exist" # warning: block supersedes default value argument
} # 警告が表示される。

h.default = "default"
p h.fetc...

Hash#fetch(key, default) -> object (7.0)

key に関連づけられた値を返します。該当するキーが登録されてい ない時には、引数 default が与えられていればその値を、ブロッ クが与えられていればそのブロックを評価した値を返します。

...ey|"#{key} not exist"} #=> "two not exist"
p h.fetch(:two, "error"){|key| #=> "two not exist"
"#{key} not exist" # warning: block supersedes default value argument
} # 警告が表示される。

h.default = "default"
p h.fetc...

絞り込み条件を変える

IO#sysseek(offset, whence = IO::SEEK_SET) -> Integer (7.0)

lseek(2) と同じです。IO#seek では、 IO#sysread, IO#syswrite と併用すると正しく動作しないので代わりにこのメソッドを使います。 位置 offset への移動が成功すれば移動した位置(ファイル先頭からのオフセット)を返します。

...# => -:3:in `sysseek': sysseek for buffered IO (IOError)

File.open("/dev/null", "w") {|f|
f.print "foo"
f.sysseek(0)
}
# => -:3: warning: sysseek for buffered IO

@param offset ファイルポインタを移動させるオフセットを整数で指定します。

@param whence...

Integer#**(other) -> Numeric (7.0)

算術演算子。冪(べき乗)を計算します。

...になりそうなとき、警告を出したうえで Float::INFINITY を返します。

//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}

判定の閾値は変わりえます。


@see BigDecimal#power...

Integer#pow(other) -> Numeric (7.0)

算術演算子。冪(べき乗)を計算します。

...になりそうなとき、警告を出したうえで Float::INFINITY を返します。

//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}

判定の閾値は変わりえます。


@see BigDecimal#power...

Integer#pow(other, modulo) -> Integer (7.0)

算術演算子。冪(べき乗)を計算します。

...になりそうなとき、警告を出したうえで Float::INFINITY を返します。

//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}

判定の閾値は変わりえます。


@see BigDecimal#power...

Regexp#~ -> Integer | nil (7.0)

変数 $_ の値との間でのマッチをとります。

...=~ $_
//}

//emlist[例][ruby]{
$_ = "hogehoge"

if /foo/
puts "match"
else
puts "no match"
end
# => no match
# ただし、警告がでる。warning: regex literal in condition

reg = Regexp.compile("foo")

if ~ reg
puts "match"
else
puts "no match"
end
# => no match

if reg
puts "matc...

絞り込み条件を変える

<< < 1 2 3 > >>