別のキーワード
ライブラリ
- ビルトイン (280)
-
cgi
/ core (24) - continuation (12)
- csv (24)
- fiddle (12)
- matrix (48)
- nkf (12)
- openssl (12)
-
rdoc
/ context (12) -
rexml
/ document (12) -
rubygems
/ requirement (36) -
rubygems
/ version (24) - thread (2)
- zlib (12)
クラス
-
ARGF
. class (96) - Array (21)
- CGI (24)
- CSV (24)
- Exception (24)
-
Fiddle
:: Function (12) - File (24)
-
Gem
:: Requirement (36) -
Gem
:: Version (24) - Matrix (48)
-
OpenSSL
:: SSL :: Session (12) -
RDoc
:: Context :: Section (12) -
REXML
:: Instruction (12) - Rational (12)
-
RubyVM
:: InstructionSequence (48) - String (21)
-
Zlib
:: GzipReader (12)
モジュール
- Enumerable (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - === (12)
- =~ (12)
- ConditionVariable (12)
- Continuation (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NKF (12)
- Requirement (12)
- Win32ネイティブ版Rubyの互換性問題 (12)
-
backtrace
_ locations (12) - disasm (24)
- disassemble (24)
- downcase (9)
- each (48)
-
each
_ line (48) - eigen (12)
- eigensystem (12)
- eql? (12)
- fiddle (12)
- header (12)
- instance (24)
- lineno= (12)
- lstat (24)
- lup (12)
-
lup
_ decomposition (12) - new (12)
- out (12)
- pack (21)
- pack テンプレート文字列 (12)
- partition (24)
- rss (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 8 . 5 feature (12) -
ruby 1
. 9 feature (12) -
satisfied
_ by? (12) - unpack (12)
- yaml (12)
- 制御構造 (12)
- 多言語化 (12)
検索結果
先頭5件
-
Exception
# ==(other) -> bool (21134.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。......定した場合は
Exception#exception を実行して変換を試みます。
//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue =......ception { check_long_month(e) } }
p results.map { |e| e.class }
# => [RuntimeError, RuntimeError, RuntimeError]
p results.map { |e| e.message }
# => ["2 is not long month", "2 is not long month", "4 is not long month"]
# class, message, backtrace が同一のため true になる
p results[0] == re... -
Rational
# ==(other) -> bool (21130.0) -
数値として等しいか判定します。
...なければ false を返します。
//emlist[例][ruby]{
Rational(2, 3) == Rational(2, 3) # => true
Rational(5) == 5 # => true
Rational(0) == 0.0 # => true
Rational('1/3') == 0.33 # => false
Rational('1/2') == '1/2' # => false
//}......でなければ false を返します。
//emlist[例][ruby]{
Rational(2, 3) == Rational(2, 3) # => true
Rational(5) == 5 # => true
Rational(0) == 0.0 # => true
Rational('1/3') == 0.33 # => false
Rational('1/2') == '1/2' # => false
//}... -
OpenSSL
:: SSL :: Session # ==(other) -> bool (21100.0) -
otherと自身が同一のセッションであれば真を返します。
otherと自身が同一のセッションであれば真を返します。 -
RDoc
:: Context :: Section # ==(other) -> bool (21100.0) -
自身と other のシーケンス番号を比較した結果を返します。
...自身と other のシーケンス番号を比較した結果を返します。
@param other RDoc::Context::Section オブジェクトを指定します。... -
REXML
:: Instruction # ==(other) -> bool (21100.0) -
other と self が同じ 処理命令である場合に真を返します。
...other と self が同じ 処理命令である場合に真を返します。
同じとは、 REXML::Instruction#target と REXML::Instruction#content
が一致することを意味します。
@param other 比較対象... -
Gem
:: Requirement # ===(version) -> bool (12300.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
...引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。
そうでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfi......ed_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//}... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (9206.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require.......day == 31
raise "#{month} is not long month"
end
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#backtrace... -
Enumerable
# partition -> Enumerator (6106.0) -
各要素を、ブロックの条件を満たす要素と満たさない要素に分割します。 各要素に対してブロックを評価して、その値が真であった要素の配列と、 偽であった要素の配列の 2 つを配列に入れて返します。
...要素の配列と、
偽であった要素の配列の 2 つを配列に入れて返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0].partition {|i| i % 3 == 0 }
#=> [[9, 6, 3, 0], [10, 8, 7, 5, 4, 2, 1]]
//}... -
Enumerable
# partition {|item| . . . } -> [[object] , [object]] (6106.0) -
各要素を、ブロックの条件を満たす要素と満たさない要素に分割します。 各要素に対してブロックを評価して、その値が真であった要素の配列と、 偽であった要素の配列の 2 つを配列に入れて返します。
...要素の配列と、
偽であった要素の配列の 2 つを配列に入れて返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0].partition {|i| i % 3 == 0 }
#=> [[9, 6, 3, 0], [10, 8, 7, 5, 4, 2, 1]]
//}...