るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

モジュール

キーワード

検索結果

<< < ... 9 10 11 >>

Exception#message -> String (113.0)

エラーメッセージをあらわす文字列を返します。

...エラーメッセージをあらわす文字列を返します。

//emlist[例][ruby]{
begin

1 + nil
r
escue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}...

Exception#to_json(*args) -> String (113.0)

自身を JSON 形式の文字列に変換して返します。

...erator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。

//emlist[例][ruby]{
r
equire "json/add/core"

begin

0/0
r
escue => e
e.to_json # => "{\"json_class\":\"ZeroDivisionError\...
...",\"m\":\"divided by 0\",\"b\":[\"/path/to/test.rb:4:in `/'\",\"/path/to/test.rb:4:in `<main>'\"]}"
end
//}

@see JSON::Generator::GeneratorMethods::Hash#to_json...

Exception#to_s -> String (113.0)

エラーメッセージをあらわす文字列を返します。

...エラーメッセージをあらわす文字列を返します。

//emlist[例][ruby]{
begin

1 + nil
r
escue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}...

MatchData#end(n) -> Integer | nil (113.0)

n 番目の部分文字列終端のオフセットを返します。

...がマッチしていなければ nil を返します。

@param n 部分文字列を指定する数値。

@raise IndexError 範囲外の n を指定した場合に発生します。

//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.end(0) # => 6
p $~.end(1) # => 3
p $~.end(2) # =>...
...6
p $~.end(3) # => nil
p $~.end(4) # => `end': index 4 out of matches (IndexError)
//}

@see MatchData#begin...

SignalException#signm -> String (113.0)

self.message のエイリアスです。

...self.message のエイリアスです。

//emlist[例][ruby]{
begin

Process.kill('HUP', Process.pid)
sleep
r
escue SignalException => e
puts e.signm # => SIGHUP
end
//}...

絞り込み条件を変える

SignalException#signo -> Integer (113.0)

self のシグナル番号を返します。

...self のシグナル番号を返します。

//emlist[例][ruby]{
p Signal.signame(1) # => "HUP"
begin

Process.kill('HUP', Process.pid)
sleep
r
escue SignalException => e
p e.signo # => 1
end
//}...
<< < ... 9 10 11 >>