るりまサーチ

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

別のキーワード

  1. _builtin exception
  2. exception exception
  3. bigdecimal exception_nan
  4. thread abort_on_exception
  5. bigdecimal exception_all

検索結果

<< 1 2 > >>

MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS -> [Class] (12100.0)

システム関連の例外のリストです。内部で使用します。

システム関連の例外のリストです。内部で使用します。

MiniTest::Assertions#exception_details(exception, message) -> String (9208.0)

与えられた例外の詳細を文字列として返します。

...与えられた例外の詳細を文字列として返します。

@param exception 例外を指定します。

@param message メッセージを指定します。...

Exception#backtrace_locations -> [Thread::Backtrace::Location] (9076.0)

バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。

...レース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。

現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。

//emlist[例: test.rb][ruby]{
require "date"
def ch...
...def get_exception
return begin
yield
rescue => e
e
end
end

e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_exception'", "test.rb:15:in `<main>'"]
//}

@see Exception#backtr...

Exception#full_message(highlight: true, order: :bottom) -> String (9036.0)

例外の整形された文字列を返します。

...値は Exception.to_tty? の返り値と同じです。

@param order :top か :bottom で指定する必要があります。
バックトレースの一番奥がエラーメッセージの上(top)か下(bottom)かを指定します。
デフォルト値は Exception.to_tt...
...mlist[例][ruby]{
begin
raise "test"
rescue => e
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
$stderr = $stdout
p e.full_message # => "test.rb:2:in `<main>': test (RuntimeError)\n"
$stderr = S...
...TDERR
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
end
//}

@see Exception.to_tty?...

Exception#set_backtrace(errinfo) -> nil | String | [String] (9012.0)

バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。

...定します。

//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
$!.backtrace # => ["/path/to/test.rb:5:in `rescue in <main>'", "/path/to/test.rb:2:in `<main>'"]
$!.set_backtrace(["dummy1", "dummy2"])
$!.backtrace # => ["dummy1", "dummy2"]
end
//}...

絞り込み条件を変える

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

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

...れます。

//emlist[例][ruby]{
require "json/add/core"

begin
0/0
rescue => 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...

MiniTest::Unit#puke(klass, method_name, exception) -> String (3107.0)

テストメソッドの実行結果が成功以外の場合に、その種類と理由を記録します。

...ます。

@param klass テストクラスを指定します。

@param method_name テストメソッドの名前を指定します。

@param exception 例外クラスを指定します。

@return 与えられた例外クラスによって "Skip", "Failure", "Error" の
いずれかの頭...

MiniTest::Unit#location(exception) -> String (3101.0)

与えられた例外の発生した場所を返します。

与えられた例外の発生した場所を返します。

ruby 1.8.4 feature (246.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...ruby 1.8.4 feature/printf [bug]>))
* ((<ruby 1.8.4 feature/Hash [bug]>))
* ((<ruby 1.8.4 feature/test [bug]>))
* ((<ruby 1.8.4 feature/File.identical? [new]>))
* ((<ruby 1.8.4 feature/FileTest.identical? [new]>))
* ((<ruby 1.8.4 feature/File.split [change]>))
* ((<ruby 1.8.4 feature/File...
..._inspect), parse.y (parser_yylex, rb_symname_p): check
# if valid as a symbol name more strictly. [ruby-dev:27478]
#
# * test/ruby/test_symbol.rb: tests for [ruby-core:03573].

Symbolに適合する文字列を厳密にした。((<ruby-core:03573>)),((<ruby-dev:27478>))

1...
...-talk:165866>))

: Iconv

#Sun Nov 6 23:39:13 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * ext/iconv/iconv.c (Iconv::BrokenLibrary): exception when detected a
# bug of underlying library.

errnoが正しくセットされなかったときの例外を追加(Windowsで
ic...

Ruby用語集 (48.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...る。

また、例外オブジェクトは例外が発生した時点までのスタックトレースを保持しており、
Exception
#backtrace や Exception#backtrace_locations で
取り出すことができる。

: スーパークラス
: superclass
クラス B がクラス A のサ...
...よっては「即値」という用語を「リテラル」の意味で使うので注意されたい。

: ソフトウェアテスト
: software testing
プログラムの正しさや性能を調べること。単に「テスト」ともいう。
狭義にはテスト用プログラム(テ...
...ックスイン

: 単項演算子
: unary operator
単一の項に働く演算子。+ - ! not などが該当する。

: 単体テスト
: unit testing
=ユニットテスト

: 短絡評価
: short-circuit evaluation
論理式の評価において、真偽を確定するための最小限...

絞り込み条件を変える

Rubyの起動 (42.0)

Rubyの起動 * cmd_option * shebang

...指定します。

//emlist{
# test.rb
def f6 = raise
def f5 = f6
def f4 = f5
def f3 = f4
def f2 = f3
def f1 = f2
f1
//}

//emlist{
% ruby --backtrace-limit=3 test.rb
test
.rb:1:in `f6': unhandled exception
from test.rb:2:in `f5'
from test.rb:3:in `f4'
from test.rb:4:in `f3'
... 3 levels......

ruby 1.6 feature (42.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...: 2002-03-08 class variable

((<ruby-talk:35122>))

class C
class << self
def test
@@cv = 5
p @@cv
end
end

test

end
=> -:5:in `test': uninitialized class variable @@cv in C (NameError)
from -:9
ruby 1.6.7 (2002...
...def initialize}
end
}

=> ruby 1.6.5 (2001-09-19) [i586-linux]
NotImplementedError
MatchData
Exception

Numeric
MatchData
Segmentation fault

=> ruby 1.6.5 (2001-10-15) [i586-linux]
MatchDat...
...6.5 (2001-09-19) [i586-linux]

: Dir.glob

以下のコードが無限ループになっていました。

Dir.mkdir("test?") rescue nil
p Dir.glob("test?/*")
=> ruby 1.6.5 (2001-09-19) [i586-linux]
[]

: jcode
バグがいくつか修正されました。((<r...

ruby 1.8.3 feature (36.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...cat test_dlg.rb
foo = Object.new
foo2 = SimpleDelegator.new(foo)
def foo.bar
puts "bar"
end
foo2.bar

$ ruby-1.8.2 -r delegate test_dlg.rb
test
_dlg.rb:6: undefined method `bar' for #<Object:0x4021b0a0> (NoMethodError)

$ ruby-1.8.3 -r delegate test_dl...
...SystemCallError
: SystemExit
各例外クラスのインスタンスが生成される時に、親クラスのコンストラクタ
である Exception#initialize が呼ばれるようになりました。((<ruby-talk:142593>)) ((<ruby-dev:26177>))

=== 2005-05-11
: break [ruby] [bug]
メソ...
...はなく
"assignment" を返すようになりました。
((<"[yarv-dev:418]"|URL:http://www.atdot.net/mla/yarv-dev/418>))

=== 2005-02-17
: Test::Unit::AutoRunner.run [lib] [change]
第一引数の意味が変わりました。

=== 2005-02-14

: OpenSSL::SSL::SSLSocket#post_connection_chec...
<< 1 2 > >>