別のキーワード
ライブラリ
- ビルトイン (171)
- base64 (1)
- bigdecimal (4)
- csv (5)
- date (1)
- dbm (1)
- delegate (1)
- digest (2)
- drb (2)
- fiddle (3)
- gdbm (1)
- ipaddr (3)
- matrix (4)
-
net
/ ftp (1) - nkf (1)
- objspace (1)
- openssl (10)
- ostruct (1)
- pathname (3)
- prime (2)
- rake (2)
-
rdoc
/ context (1) -
rexml
/ document (4) -
rinda
/ rinda (1) -
rubygems
/ package / tar _ header (1) -
rubygems
/ platform (2) -
rubygems
/ requirement (3) -
rubygems
/ version (1) - sdbm (3)
- set (4)
- socket (1)
- uri (1)
-
webrick
/ httpauth (1) -
webrick
/ httpauth / htdigest (1) -
webrick
/ httpauth / htpasswd (1) - win32ole (1)
- zlib (1)
クラス
- Array (17)
- BasicObject (4)
- BasicSocket (1)
- BigDecimal (4)
- Binding (1)
- CSV (1)
-
CSV
:: Row (1) -
CSV
:: Table (3) - Complex (1)
- DBM (1)
-
DRb
:: DRbObject (2) - Date (1)
- Delegator (1)
-
Digest
:: Base (2) - Enumerator (2)
-
Enumerator
:: Lazy (5) - Exception (2)
- FalseClass (2)
-
Fiddle
:: Function (1) -
Fiddle
:: Pointer (2) - Float (2)
- GDBM (1)
-
Gem
:: Package :: TarHeader (1) -
Gem
:: Platform (2) -
Gem
:: Requirement (3) -
Gem
:: Version (1) - Hash (10)
- IPAddr (3)
- Integer (4)
- KeyError (1)
- MatchData (2)
- Matrix (2)
- Method (7)
- Module (1)
-
Net
:: FTP :: MLSxEntry (1) - Numeric (1)
- Object (7)
-
OpenSSL
:: BN (5) -
OpenSSL
:: PKey :: EC :: Group (2) -
OpenSSL
:: PKey :: EC :: Point (2) -
OpenSSL
:: SSL :: Session (1) - OpenStruct (1)
- Pathname (3)
- Prime (2)
-
Process
:: Status (1) -
RDoc
:: Context :: Section (1) -
REXML
:: Attribute (1) -
REXML
:: Comment (1) -
REXML
:: Instruction (1) -
REXML
:: XMLDecl (1) -
Rake
:: FileList (1) - Random (1)
- Range (12)
- Rational (1)
- Regexp (3)
-
Rinda
:: DRbObjectTemplate (1) -
RubyVM
:: InstructionSequence (4) - SDBM (3)
- Set (4)
- String (21)
- Struct (2)
- Symbol (3)
- SystemCallError (1)
- Thread (1)
- TrueClass (3)
-
URI
:: Generic (1) - UnboundMethod (4)
- Vector (2)
-
WIN32OLE
_ TYPE (1) -
Zlib
:: GzipReader (1)
モジュール
- Base64 (1)
- Comparable (1)
- Enumerable (38)
- GC (1)
- ObjectSpace (1)
-
Process
:: GID (1) -
Process
:: UID (1) -
Rake
:: Cloneable (1) -
WEBrick
:: HTTPAuth (1)
キーワード
- != (1)
- & (1)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (1) - === (18)
- =~ (1)
- ConditionVariable (1)
- Htdigest (1)
- Htpasswd (1)
-
NEWS for Ruby 2
. 0 . 0 (1) -
NEWS for Ruby 2
. 1 . 0 (1) -
NEWS for Ruby 2
. 2 . 0 (1) -
NEWS for Ruby 2
. 3 . 0 (1) -
NEWS for Ruby 2
. 4 . 0 (1) -
NEWS for Ruby 2
. 5 . 0 (1) - NKF (1)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (1)
- Ruby用語集 (1)
- String (1)
- Symbol (1)
- Win32ネイティブ版Rubyの互換性問題 (1)
- [] (7)
- ^ (2)
-
_ _ id _ _ (1) - allbits? (1)
- assoc (1)
-
backtrace
_ locations (1) -
basic
_ auth (1) - bigdecimal (1)
- call (2)
-
chunk
_ while (1) - clone (3)
- count (4)
-
default
_ event _ sources (1) - delete (2)
-
delete
_ if (3) - detect (2)
- disasm (2)
- disassemble (2)
- dump (1)
- dup (1)
- each (2)
- encode64 (1)
- eql? (19)
- equal? (1)
- file? (1)
- find (2)
-
find
_ all (2) -
find
_ index (3) -
generate
_ prime (1) - getpeername (1)
-
has
_ value? (1) - hash (3)
- id2name (1)
- include? (5)
- instance (1)
- intern (1)
- itself (1)
-
keep
_ if (2) - key (1)
-
latest
_ gc _ info (1) - lazy (1)
- lineno= (1)
-
local
_ variable _ defined? (1) - max (12)
- member? (3)
-
memsize
_ of _ all (1) - min (12)
-
mod
_ inverse (1) -
net
/ http (1) - new (4)
- nobits? (1)
- none? (3)
- one? (3)
- pack (2)
- pack テンプレート文字列 (1)
- partition (2)
-
pending
_ interrupt? (1) - rassoc (1)
-
rb
_ equal (1) -
rb
_ f _ require (1) - rdoc (1)
- reject (3)
- reject! (1)
-
ruby 1
. 6 feature (1) -
ruby 1
. 8 . 2 feature (1) -
ruby 1
. 8 . 3 feature (1) -
ruby 1
. 8 . 4 feature (1) -
ruby 1
. 8 . 5 feature (1) -
ruby 1
. 9 feature (1) -
satisfied
_ by? (1) - select (5)
- select! (2)
- sign (1)
- slice (6)
-
slice
_ after (1) -
slice
_ before (3) -
slice
_ when (1) - sort (2)
- split (1)
- sum (1)
- switch (2)
-
to
_ s (1) -
to
_ sym (1) - unpack (1)
- value? (1)
-
webrick
/ cgi (1) - yaml (1)
- | (2)
- クラス/メソッドの定義 (1)
- 制御構造 (1)
- 多言語化 (1)
- 演算子式 (1)
検索結果
先頭5件
-
bigdecimal (78451.0)
-
bigdecimal は浮動小数点数演算ライブラリです。 任意の精度で 10 進表現された浮動小数点数を扱えます。
bigdecimal は浮動小数点数演算ライブラリです。
任意の精度で 10 進表現された浮動小数点数を扱えます。
//emlist[][ruby]{
require 'bigdecimal'
a = BigDecimal("0.123456789123456789")
b = BigDecimal("123456.78912345678", 40)
print a + b # => 0.123456912580245903456789e6
//}
一般的な 10 進数の計算でも有用です。2 進数の浮動小数点演算には微小な誤
差があるのに対し、BigDecimal では正確な値を得る事がで... -
Object
# ==(other) -> bool (63673.0) -
オブジェクトと other が等しければ真を返します。
オブジェクトと other が等しければ真を返します。
このメソッドは各クラスの性質に合わせて再定義すべきです。
多くの場合、オブジェクトの内容が等しければ真を返すように
(同値性を判定するように)再定義されることが期待されています。
デフォルトでは equal? と同じオブジェクト
の同一性判定になっています。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
p("foo" == "bar") #=> false
p("foo" == "foo") #=> true
p(4 == 4) #=> true
p(4 == 4.0) #=> t... -
UnboundMethod
# ==(other) -> bool (63673.0) -
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
a = String.instance_method(:size)
b = String.instance_method(:size)
p a == b #=> true
c = Array.instance_method(:size)
p a == c ... -
Digest
:: Base # ==(md) -> bool (63643.0) -
与えられたダイジェストオブジェクトと比較します。
与えられたダイジェストオブジェクトと比較します。
@param md 比較対象のダイジェストオブジェクト
require 'digest/md5'
digest1 = Digest::MD5.new
digest1.update("ruby")
digest2 = Digest::MD5.new
digest2.update("ruby")
p digest1 == digest2 # => true
digest2.update("RUBY")
p diges... -
Digest
:: Base # ==(str) -> bool (63643.0) -
与えられた文字列を hexdigest 値と見て、自身の hexdigest 値と比較します。
与えられた文字列を hexdigest 値と見て、自身の hexdigest 値と比較します。
@param str 比較対象の hexdigest 文字列
require 'digest/md5'
digest = Digest::MD5.new
digest.update("ruby")
p digest == "58e53d1324eef6265fdb97b08ed9aadf" # => true -
BasicObject
# ==(other) -> bool (63637.0) -
オブジェクトが other と等しければ真を、さもなくば偽を返します。
オブジェクトが other と等しければ真を、さもなくば偽を返します。
このメソッドは各クラスの性質に合わせて、サブクラスで再定義するべきです。
多くの場合、オブジェクトの内容が等しければ真を返すように (同値性を判定するように) 再定義
することが期待されています。
デフォルトでは Object#equal? と同じオブジェクトの同一性になっています。
@param other 比較対象となるオブジェクト
@return other が self と同値であれば真、さもなくば偽
//emlist[例][ruby]{
class Person < BasicObject
def i... -
CSV
:: Table # ==(other) -> bool (63637.0) -
自身の全ての行が比較対象と同じである場合は真を返します。 そうでない場合は偽を返します。
自身の全ての行が比較対象と同じである場合は真を返します。
そうでない場合は偽を返します。
@param other CSV::Table を指定します。
//emlist[例][ruby]{
require "csv"
row1_1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row1_2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
row2_1 = CSV::Row.new(["header1", "header2"], ["ro... -
Comparable
# ==(other) -> bool (63637.0) -
比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が 0 を返した時に、true を返します。 それ以外を返した場合は、false を返します。
比較演算子 <=> をもとにオブジェクト同士を比較します。
<=> が 0 を返した時に、true を返します。
それ以外を返した場合は、false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
1 == 1 # => true
1 == 2 # => false
//} -
BigDecimal
# ==(other) -> bool (63619.0) -
self が other と等しい場合に true を、そうでない場合に false を返します。
self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//} -
DRb
:: DRbObject # ==(other) -> bool (63601.0) -
DRb::DRbObject オブジェクト同士が同じであるなら真を返します。
DRb::DRbObject オブジェクト同士が同じであるなら真を返します。
この同値判定は、
オブジェクトが参照している URI と識別子が等しいかどうかでします。 -
OpenSSL
:: BN # ==(other) -> bool (63601.0) -
自身と other が等しい場合に true を返します。
自身と other が等しい場合に true を返します。
@param other 比較する数 -
REXML
:: Attribute # ==(other) -> bool (63601.0) -
属性の名前と値が other と一致する場合に真を返します。
属性の名前と値が other と一致する場合に真を返します。 -
Symbol
# ==(other) -> true | false (63337.0) -
other が同じシンボルの時に真を返します。 そうでない場合は偽を返します。
other が同じシンボルの時に真を返します。
そうでない場合は偽を返します。
@param other 比較対象のシンボルを指定します。
例:
:aaa == :aaa #=> true
:aaa == :xxx #=> false -
Hash
# ==(other) -> bool (54757.0) -
自身と other が同じ数のキーを保持し、キーが eql? メソッドで比較して全て等しく、 値が == メソッドで比較して全て等しい場合に真を返します。
自身と other が同じ数のキーを保持し、キーが eql? メソッドで比較して全て等しく、
値が == メソッドで比較して全て等しい場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
#(出力関数は省略)
{ 1 => :a } == { 1 => :a } #=> true
{ 1 => :a } == { 1 => :a, 2 => :b } #=> false
{ 1 => :a } == { 1.0 => :a } #=> fa... -
MatchData
# ==(other) -> bool (54727.0) -
self と other のマッチ対象になった文字列、元になった正規表現オブジェク ト、マッチした位置が等しければ true を返します。そうでない場合には false を返します。
self と other のマッチ対象になった文字列、元になった正規表現オブジェク
ト、マッチした位置が等しければ true を返します。そうでない場合には
false を返します。
@param other 比較対象のオブジェクトを指定します。
//emlist[文字列][ruby]{
s = "abc"
m1 = s.match("a")
m2 = s.match("b")
m1 == m2 # => false
m2 = s.match("a")
m1 == m2 # => true
//}
//emlist[正規表現][ruby]{
r = /abc/
m1 = r.mat... -
Array
# ==(other) -> bool (54703.0) -
自身と other の各要素をそれぞれ順に == で比較し て、全要素が等しければ true を返します。そうでない場合には false を返します。
自身と other の各要素をそれぞれ順に == で比較し
て、全要素が等しければ true を返します。そうでない場合には false を返します。
@param other 自身と比較したい配列を指定します。
@see Object#==
//emlist[例][ruby]{
[ "a", "c" ] == [ "a", "c", 7 ] #=> false
[ "a", "c", 7 ] == [ "a", "c", 7 ] #=> true
[ "a", "c", 7 ] == [ "a", "d", "f" ] #=> false
//} -
Exception
# ==(other) -> bool (54703.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 D... -
Range
# ==(other) -> bool (54703.0) -
指定された other が Range クラスのインスタンスであり、 始端と終端が == メソッドで比較して等しく、Range#exclude_end? が同じ場合に true を返します。そうでない場合に false を返します。
指定された other が Range クラスのインスタンスであり、
始端と終端が == メソッドで比較して等しく、Range#exclude_end? が同じ場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
p (1..2) == (1..2) # => true
p (1..2) == (1...2) # => false
p (1..2) == Range.new(1.0, 2.0) # => t... -
Float
# ==(other) -> bool (54691.0) -
比較演算子。数値として等しいか判定します。
比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[例][ruby]{
3.14 == 3.14000 # => true
3.14 == 3.1415 # => false
//}
NaNどうしの比較は、未定義です。
//emlist[例][ruby]{
Float::NAN == Float::NAN # => false
[Float::NAN] == [Fl... -
Rational
# ==(other) -> bool (54691.0) -
数値として等しいか判定します。
数値として等しいか判定します。
@param other 自身と比較する数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[例][ruby]{
Rational(2, 3) == Rational(2, 3) # => true
Rational(5) == 5 # => true
Rational(0) == 0.0 # => true
Rational('1/3') == 0.... -
Regexp
# ==(other) -> bool (54673.0) -
otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。
otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。
@param other 正規表現を指定します。
//emlist[例][ruby]{
p /^eee$/ == /~eee$/x # => false
p /^eee$/ == /~eee$/i # => false
p /^eee$/e == /~eee$/u # => false
p /^eee$/ == Regexp.new("^eee$") # => true
p /^eee$/.eql?(/^eee$/) # => true
//} -
String
# ==(other) -> bool (54673.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false を返します。
@param other 任意のオブジェクト
@return true か false
//emlist[例][ruby]{
stringlike = Object.new
def stringlike.==(other)
"string" == ... -
Struct
# ==(other) -> bool (54667.0) -
self と other のクラスが同じであり、各メンバが == メソッドで比較して等しい場合に true を返します。そうでない場合に false を返します。
self と other のクラスが同じであり、各メンバが == メソッドで比較して等しい場合に
true を返します。そうでない場合に false を返します。
@param other self と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
Dog = Struct.new(:name, :age)
dog1 = Dog.new("fred", 5)
dog2 = Dog.new("fred", 5)
p dog1 == dog2 #=> true
p dog1.eql?(dog2) #=> tr... -
Complex
# ==(other) -> bool (54655.0) -
数値として等しいか判定します。
数値として等しいか判定します。
@param other 自身と比較する数値
//emlist[例][ruby]{
Complex(2, 1) == Complex(1) # => false
Complex(1, 0) == Complex(1) # => true
Complex(1, 0) == 1 # => true
//} -
Method
# ==(other) -> bool (54655.0) -
自身と other が同じインスタンスの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。
自身と other が同じインスタンスの同じメソッドを表す場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
s = "bar"
a = s.method(:size)
b = s.method(:size)
p a == b #=> true
//} -
Pathname
# ==(other) -> bool (54655.0) -
パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。
パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。
other は Pathname オブジェクトでなければなりません。
パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。
@param other 比較対象の Pathname オブジェクトを指定します。
//emlist[例][ruby]{
require 'pathname'
p Pathname.new("foo/bar") == Pathname.new("foo/bar")
p Pathname.new("foo/bar"... -
Random
# ==(other) -> bool (54655.0) -
乱数生成器が等しい状態であるならばtrue を返します。
乱数生成器が等しい状態であるならばtrue を返します。
@param other 比較対象の乱数生成器
//emlist[例][ruby]{
r1 = Random.new(1)
r2 = Random.new(1)
p r1 == r2 # => true
r2.rand
p r1 == r2 # => false
r1.rand
p r1 == r2 # => true
//} -
CSV
:: Row # ==(other) -> bool (54637.0) -
自身が other と同じヘッダやフィールドを持つ場合に真を返します。 そうでない場合は偽を返します。
自身が other と同じヘッダやフィールドを持つ場合に真を返します。
そうでない場合は偽を返します。
@param other 比較対象の CSV::Row のインスタンスを指定します。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row1 == row2 # => true
row2 << ["he... -
Fiddle
:: Pointer # ==(other) -> bool (54637.0) -
ポインタの指すアドレスが同一ならばtrueを返します。
ポインタの指すアドレスが同一ならばtrueを返します。
@param other 比較対象の Pointer オブジェクト
例:
require 'fiddle'
s = 'abc'
cptr = Fiddle::Pointer[s]
cptr0 = Fiddle::Pointer[s]
cptr1 = cptr + 1
p cptr == cptr1 #=> false
p cptr == cptr0 #=> true -
Integer
# ==(other) -> bool (54637.0) -
比較演算子。数値として等しいか判定します。
比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//} -
Set
# ==(set) -> bool (54637.0) -
2 つの集合が等しいときに true を返します。
2 つの集合が等しいときに true を返します。
より厳密には、引数 set が Set オブジェクトであり、self と set が同数の
要素を持ち、かつそれらの要素がすべて等しい場合に true となります。
それ以外の場合には、false を返します。
要素の等しさは Object#eql? により判定されます。
@param set 比較対象のオブジェクトを指定します。
//emlist[][ruby]{
require 'set'
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 40]
s3 = Set[30, 10, 30, 20]
p s1... -
IPAddr
# ==(ipaddr) -> bool (54619.0) -
IPAddr オブジェクト同士が等しいかを比較します。
IPAddr オブジェクト同士が等しいかを比較します。
@param ipaddr 比較対象の IPAddr オブジェクト。
また、数値や文字列も受け付けます。
例:
require "ipaddr"
p IPAddr.new("192.168.0.1") == IPAddr.new("192.168.0.1/24") # => false -
Rake
:: FileList # ==(array) -> bool (54619.0) -
自身を配列に変換してから与えられた配列と比較します。
自身を配列に変換してから与えられた配列と比較します。
@param array 比較対象の配列を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new('lib/**/*.rb', 'test/test*.rb')
file_list == file_list.to_a # => true
end
//} -
URI
:: Generic # ==(uri) -> bool (54619.0) -
引数に指定した URI (文字列またはURIオブジェクト)との一致判定を行い ます。URI は正規化して比較されます。
引数に指定した URI (文字列またはURIオブジェクト)との一致判定を行い
ます。URI は正規化して比較されます。
@param uri 比較したい URI を URI オブジェクトで指定します。
例:
require 'uri'
u1 = URI.parse('http://example.com/?hoge')
u2 = URI.parse('http://Example.Com/?hoge')
p u1 == u2 #=> true -
Delegator
# ==(obj) -> bool (54601.0) -
自身が与えられたオブジェクトと等しい場合は、真を返します。 そうでない場合は、偽を返します。
自身が与えられたオブジェクトと等しい場合は、真を返します。
そうでない場合は、偽を返します。
@param obj 比較対象のオブジェクトを指定します。 -
Gem
:: Package :: TarHeader # ==(other) -> bool (54601.0) -
自身と other が等しければ真を返します。 そうでない場合は偽を返します。
自身と other が等しければ真を返します。
そうでない場合は偽を返します。
@param other 比較対象のオブジェクトを指定します。 -
Gem
:: Platform # ==(other) -> bool (54601.0) -
自身と other が同じプラットフォームである場合に真を返します。 そうでない場合は偽を返します。
自身と other が同じプラットフォームである場合に真を返します。
そうでない場合は偽を返します。
同じプラットフォームであるとは、二つのプラットフォームの
CPU, OS, バージョンが同じであるということです。
@param other 比較対象のオブジェクトです。 -
Matrix
# ==(other) -> bool (54601.0) -
自分自身と other を比較し、同値であれば真(true)を返します。
自分自身と other を比較し、同値であれば真(true)を返します。
@param other 比較対象のオブジェクト -
OpenSSL
:: PKey :: EC :: Group # ==(other) -> bool (54601.0) -
自身が other と等しいときは true を返します。
自身が other と等しいときは true を返します。
@param other 比較対象の OpenSSL::PKey::EC::Group オブジェクト -
OpenSSL
:: PKey :: EC :: Point # ==(other) -> bool (54601.0) -
自身が other と等しいならば true を返します。
自身が other と等しいならば true を返します。
@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します -
OpenSSL
:: SSL :: Session # ==(other) -> bool (54601.0) -
otherと自身が同一のセッションであれば真を返します。
otherと自身が同一のセッションであれば真を返します。 -
OpenStruct
# ==(other) -> bool (54601.0) -
自身と比較対象のオブジェクトが等しい場合に真を返します。 そうでない場合は、偽を返します。
自身と比較対象のオブジェクトが等しい場合に真を返します。
そうでない場合は、偽を返します。
@param other 比較対象のオブジェクトを指定します。 -
Process
:: Status # ==(other) -> bool (54601.0) -
同じステータスの場合に真を返します。
同じステータスの場合に真を返します。
other が数値の場合、self.to_i との比較が行われます。こ
れは後方互換性のためです。
@param other 自身と比較したいオブジェクトを指定します。 -
RDoc
:: Context :: Section # ==(other) -> bool (54601.0) -
自身と other のシーケンス番号を比較した結果を返します。
自身と other のシーケンス番号を比較した結果を返します。
@param other RDoc::Context::Section オブジェクトを指定します。 -
REXML
:: Comment # ==(other) -> bool (54601.0) -
other と内容(REXML::Comment#string)が同じならば真を返します。
other と内容(REXML::Comment#string)が同じならば真を返します。 -
REXML
:: Instruction # ==(other) -> bool (54601.0) -
other と self が同じ 処理命令である場合に真を返します。
other と self が同じ 処理命令である場合に真を返します。
同じとは、 REXML::Instruction#target と REXML::Instruction#content
が一致することを意味します。
@param other 比較対象 -
REXML
:: XMLDecl # ==(other) -> bool (54601.0) -
self と other が同じであるならば真を返します。
self と other が同じであるならば真を返します。
「同じ」とは REXML::XMLDecl#version, REXML::XMLDecl#encoding,
REXML::XMLDecl#standalone が一致していることを意味します。
@param other 比較対象のオブジェクト -
Vector
# ==(v) -> bool (54601.0) -
自分自身と引数 v を比較し、true/false を返します。
自分自身と引数 v を比較し、true/false を返します。
@param v 比較対象ベクトル -
Object
# ===(other) -> bool (45901.0) -
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
このメソッドは case 式での振る舞いを考慮して、
各クラスの性質に合わせて再定義すべきです。
デフォルトでは内部で Object#== を呼び出します。
when 節の式をレシーバーとして === を呼び出すことに注意してください。
また Enumerable#grep でも使用されます。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
age = 12
# (0..2).===(12), (3..6).===(12), ... が実行... -
Rinda
:: DRbObjectTemplate # ===(ro) (45601.0) -
@todo
@todo
This DRbObjectTemplate matches +ro+ if the remote object's drburi
and drbref are the same. +nil+ is used as a wildcard. -
Range
# ===(obj) -> bool (36937.0) -
obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。
obj が範囲内に含まれている時に true を返します。
そうでない場合は、false を返します。
Range#=== は主に case 式での比較に用いられます。
<=> メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。
始端・終端・引数が数値であれば、 Range#cover? と同様の動きをします。
@param obj 比較対象のオブジェクトを指定します。
//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?... -
SystemCallError
. ===(other) -> bool (36937.0) -
other が SystemCallError のサブクラスのインスタンスで、 かつ、other.errno の値が self::Errno と同じ場合に真を返します。そうでない場合は偽を返します。
other が SystemCallError のサブクラスのインスタンスで、
かつ、other.errno の値が self::Errno と同じ場合に真を返します。そうでない場合は偽を返します。
従って、特に other が self.kind_of?(other) である場合には Module#=== と同様に真を返します。
その他に、 Errno::EXXX::Errno == Errno::EYYY::Errno である場合にも Errno::EXXX == Errno::EYYY.new は真を返します。
エラー名は異なるがエラーコードは同じであるような Errno::EXX... -
BigDecimal
# ===(other) -> bool (36919.0) -
self が other と等しい場合に true を、そうでない場合に false を返します。
self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//} -
Date
# ===(other) -> bool (36901.0) -
同じ日なら真を返します。
同じ日なら真を返します。
@param other 日付オブジェクト -
Gem
:: Platform # ===(other) -> bool (36901.0) -
自身と other のプラットフォームが一致する場合に真を返します。 そうでない場合は、偽を返します。
自身と other のプラットフォームが一致する場合に真を返します。
そうでない場合は、偽を返します。
プラットフォームが一致するとは、以下の条件を満たすことです。
* 同じ CPU であること、または、どちらか一方が 'universal' であること
* 同じ OS であること
* 同じバージョンであること、または、どちらか一方がバージョンを持たないこと
@param other 比較対象のオブジェクトです。 -
Gem
:: Requirement # ===(version) -> bool (36901.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。
そうでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfied_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//} -
IPAddr
# ===(ipaddr) -> bool (36901.0) -
与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
@param ipaddr 範囲に入っているかどうか調べる対象となる IPAddr オブジェクト。
また、数値や文字列も受け付けます。 -
Method
# ===(*args) -> object (36901.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
メソッドオブジェクトに封入されているメソッドを起動します。
引数やブロックはそのままメソッドに渡されます。
self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.met... -
Module
# ===(obj) -> bool (36901.0) -
指定された obj が self かそのサブクラスのインスタンスであるとき真を返します。 また、obj が self をインクルードしたクラスかそのサブクラスのインスタンスである場合にも 真を返します。上記のいずれでもない場合に false を返します。
指定された obj が self かそのサブクラスのインスタンスであるとき真を返します。
また、obj が self をインクルードしたクラスかそのサブクラスのインスタンスである場合にも
真を返します。上記のいずれでもない場合に false を返します。
言い替えると obj.kind_of?(self) が true の場合、 true を返します。
このメソッドは主に case 文での比較に用いられます。
case ではクラス、モジュールの所属関係をチェックすることになります。
//emlist[例][ruby]{
str = String.new
case str
when St... -
OpenSSL
:: BN # ===(other) -> bool (36901.0) -
自身と other が等しい場合に true を返します。
自身と other が等しい場合に true を返します。
@param other 比較する数 -
Regexp
# ===(string) -> bool (36901.0) -
文字列 string との正規表現マッチを行います。 マッチした場合は真を返します。
文字列 string との正規表現マッチを行います。
マッチした場合は真を返します。
string が文字列でもシンボルでもない場合には false を返します。
このメソッドは主にcase文での比較に用いられます。
@param string マッチ対象文字列
//emlist[例][ruby]{
a = "HELLO"
case a
when /\A[a-z]*\z/; puts "Lower case"
when /\A[A-Z]*\z/; puts "Upper case"
else; puts "Mixed case"
end
# => Upper ... -
Set
# ===(o) -> bool (36901.0) -
オブジェクト o がその集合に属する場合に true を返します。
オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//} -
Hash
# ===(other) -> bool (28057.0) -
自身と other が同じ数のキーを保持し、キーが eql? メソッドで比較して全て等しく、 値が == メソッドで比較して全て等しい場合に真を返します。
自身と other が同じ数のキーを保持し、キーが eql? メソッドで比較して全て等しく、
値が == メソッドで比較して全て等しい場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
#(出力関数は省略)
{ 1 => :a } == { 1 => :a } #=> true
{ 1 => :a } == { 1 => :a, 2 => :b } #=> false
{ 1 => :a } == { 1.0 => :a } #=> fa... -
String
# ===(other) -> bool (27973.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false を返します。
@param other 任意のオブジェクト
@return true か false
//emlist[例][ruby]{
stringlike = Object.new
def stringlike.==(other)
"string" == ... -
Pathname
# ===(other) -> bool (27955.0) -
パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。
パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。
other は Pathname オブジェクトでなければなりません。
パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。
@param other 比較対象の Pathname オブジェクトを指定します。
//emlist[例][ruby]{
require 'pathname'
p Pathname.new("foo/bar") == Pathname.new("foo/bar")
p Pathname.new("foo/bar"... -
Integer
# ===(other) -> bool (27937.0) -
比較演算子。数値として等しいか判定します。
比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//} -
Range
# member?(obj) -> bool (27337.0) -
obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。
obj が範囲内に含まれている時に true を返します。
そうでない場合は、false を返します。
Range#=== は主に case 式での比較に用いられます。
<=> メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。
始端・終端・引数が数値であれば、 Range#cover? と同様の動きをします。
@param obj 比較対象のオブジェクトを指定します。
//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?... -
Gem
:: Requirement # satisfied _ by?(version) -> bool (27301.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。
そうでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfied_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//} -
Set
# member?(o) -> bool (27301.0) -
オブジェクト o がその集合に属する場合に true を返します。
オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//} -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (18619.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
... -
Integer
# allbits?(mask) -> bool (18427.0) -
self & mask の全てのビットが 1 なら true を返します。
self & mask の全てのビットが 1 なら true を返します。
self & mask == mask と等価です。
@param mask ビットマスクを整数で指定します。
//emlist[][ruby]{
42.allbits?(42) # => true
0b1010_1010.allbits?(0b1000_0010) # => true
0b1010_1010.allbits?(0b1000_0001) # => false
0b1000_0010.allbits?(0b1010_1010) # => false
//}
@s... -
Integer
# nobits?(mask) -> bool (18427.0) -
self & mask のすべてのビットが 0 なら true を返します。
self & mask のすべてのビットが 0 なら true を返します。
self & mask == 0 と等価です。
@param mask ビットマスクを整数で指定します。
//emlist[][ruby]{
42.nobits?(42) # => false
0b1010_1010.nobits?(0b1000_0010) # => false
0b1010_1010.nobits?(0b1000_0001) # => false
0b0100_0101.nobits?(0b1010_1010) # => true
//}
@see In... -
UnboundMethod
# eql?(other) -> bool (18373.0) -
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に
true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
a = String.instance_method(:size)
b = String.instance_method(:size)
p a == b #=> true
c = Array.instance_method(:size)
p a == c ... -
RubyVM
:: InstructionSequence . disassemble(body) -> String (18355.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
引数 body で指定したオブジェクトから作成した
RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::InstructionSequence.disasm(p)
出力:
== disasm: <RubyVM::InstructionSequence:block in <main... -
Enumerable
# member?(val) -> bool (18349.0) -
val と == の関係にある要素を含むとき真を返します。
val と == の関係にある要素を含むとき真を返します。
@param val 任意のオブジェクト
//emlist[例][ruby]{
[2, 4, 6].include? 2 #=> true
[2, 4, 6].include? 1 #=> false
[2, 4, 6].member? 2 #=> true
[2, 4, 6].member? 1 #=> false
//} -
VALUE rb
_ equal(VALUE obj1 , VALUE obj2) (18349.0) -
obj1 == obj2 ならば Qtrue、 そうでないならば Qfalse。
obj1 == obj2 ならば Qtrue、
そうでないならば Qfalse。 -
VALUE rb
_ f _ require(VALUE obj , VALUE fname) (18349.0) -
require の実体。 self == obj として fname を require します。
require の実体。
self == obj として fname を require します。 -
Binding
# local _ variable _ defined?(symbol) -> bool (18337.0) -
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、 そうでない場合に false を返します。
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、
そうでない場合に false を返します。
@param symbol ローカル変数名を Symbol オブジェクトで指定します。
//emlist[例][ruby]{
def foo
a = 1
binding.local_variable_defined?(:a) # => true
binding.local_variable_defined?(:b) # => false
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
bindin... -
Range
# include?(obj) -> bool (18337.0) -
obj が範囲内に含まれている時に true を返します。 そうでない場合は、false を返します。
obj が範囲内に含まれている時に true を返します。
そうでない場合は、false を返します。
Range#=== は主に case 式での比較に用いられます。
<=> メソッドによる演算により範囲内かどうかを判定するには Range#cover? を使用してください。
始端・終端・引数が数値であれば、 Range#cover? と同様の動きをします。
@param obj 比較対象のオブジェクトを指定します。
//emlist[例][ruby]{
p ("a" .. "c").include?("b") # => true
p ("a" .. "c").include?... -
WEBrick
:: HTTPAuth . # basic _ auth(req , res , realm) {|user , pass| . . . } -> nil (18337.0) -
Basic 認証を行うためのメソッドです。
Basic 認証を行うためのメソッドです。
与えられたブロックは user, pass をブロックパラメータとして渡されて評価されます。
ブロックの評価結果が真である場合、認証が成功したことになります。
ブロックの評価結果が偽である場合、認証は失敗したことになり、例外が発生します。
@param req クライアントからのリクエストを表す WEBrick::HTTPRequest オブジェクトを指定します。
@param res WEBrick::HTTPResponse オブジェクトを指定します。
@param realm 認証のレルムを文字列で指定します。
@raise WEB... -
BigDecimal
# eql?(other) -> bool (18319.0) -
self が other と等しい場合に true を、そうでない場合に false を返します。
self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//} -
Enumerator
:: Lazy # slice _ before {|elt| bool } -> Enumerator :: Lazy (18319.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6... -
Enumerator
:: Lazy # slice _ before(initial _ state) {|elt , state| bool } -> Enumerator :: Lazy (18319.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6... -
Enumerator
:: Lazy # slice _ before(pattern) -> Enumerator :: Lazy (18319.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6... -
RubyVM
:: InstructionSequence # disassemble -> String (18319.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobje... -
DRb
:: DRbObject # eql?(other) -> bool (18301.0) -
DRb::DRbObject オブジェクト同士が同じであるなら真を返します。
DRb::DRbObject オブジェクト同士が同じであるなら真を返します。
この同値判定は、
オブジェクトが参照している URI と識別子が等しいかどうかでします。 -
Gem
:: Requirement # =~(version) -> bool (18301.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。
そうでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfied_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//} -
IPAddr
# include?(ipaddr) -> bool (18301.0) -
与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
@param ipaddr 範囲に入っているかどうか調べる対象となる IPAddr オブジェクト。
また、数値や文字列も受け付けます。 -
Method
# [](*args) -> object (18301.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
メソッドオブジェクトに封入されているメソッドを起動します。
引数やブロックはそのままメソッドに渡されます。
self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.met... -
Method
# call(*args) -> object (18301.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
メソッドオブジェクトに封入されているメソッドを起動します。
引数やブロックはそのままメソッドに渡されます。
self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.met... -
Method
# call(*args) { . . . } -> object (18301.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
メソッドオブジェクトに封入されているメソッドを起動します。
引数やブロックはそのままメソッドに渡されます。
self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.met... -
OpenSSL
:: BN # eql?(other) -> bool (18301.0) -
自身と other が等しい場合に true を返します。
自身と other が等しい場合に true を返します。
@param other 比較する数 -
Set
# include?(o) -> bool (18301.0) -
オブジェクト o がその集合に属する場合に true を返します。
オブジェクト o がその集合に属する場合に true を返します。
@param o オブジェクトを指定します。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.include?('world') # => true
p set.include?('bye') # => false
//} -
Thread
:: ConditionVariable (18127.0) -
スレッドの同期機構の一つである状態変数を実現するクラスです。
スレッドの同期機構の一つである状態変数を実現するクラスです。
以下も ConditionVariable を理解するのに参考になります。
https://ruby-doc.com/docs/ProgrammingRuby/html/tut_threads.html#UF
=== Condition Variable とは
あるスレッド A が排他領域で動いていたとします。スレッド A は現在空いていない
リソースが必要になったので空くまで待つことにしたとします。これはうまくいきません。
なぜなら、スレッド A は排他領域で動いているわけですから、他のスレッドは動くことが
できません。リ... -
Symbol (18037.0)
-
シンボルを表すクラス。シンボルは任意の文字列と一対一に対応するオブジェクトです。
シンボルを表すクラス。シンボルは任意の文字列と一対一に対応するオブジェクトです。
文字列の代わりに用いることもできますが、必ずしも文字列と同じ振る舞いをするわけではありません。
同じ内容のシンボルはかならず同一のオブジェクトです。
シンボルオブジェクトは以下のようなリテラルで得られます。
:symbol
:'symbol'
%s!symbol! # %記法
生成されたシンボルの一覧は Symbol.all_symbols で得られます。
一番目のリテラルでシンボルを表す場合、`:' の後に
は識別子、メソッド名(`!',`?',`=' などの接尾辞を含む)、変数名
(`$'... -
webrick
/ cgi (18019.0) -
一般の CGI 環境で webrick ライブラリのサーブレットと同じように CGI スクリプトを書くための ライブラリです。サーバが WEBrick でなくても使うことが出来ます。
一般の CGI 環境で webrick ライブラリのサーブレットと同じように CGI スクリプトを書くための
ライブラリです。サーバが WEBrick でなくても使うことが出来ます。
=== 使い方
WEBrick のサーブレットを作成するのと同じように、WEBrick::CGI のサブクラスでメソッド
do_GET や do_POST を定義することによって CGI スクリプトを書きます。
スクリプトの最後で WEBrick::CGI#start メソッドを呼ぶ必要があります。
WEBrick::CGI#start メソッドは service メソッドを呼び出し、service メソッ... -
ruby 1
. 6 feature (9667.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。
((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。
== 1.6.8 (2002-12-24) -> stable-snapshot
: 2003-01-22: errno
EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ
ていま... -
Enumerable
# partition {|item| . . . } -> [[object] , [object]] (9619.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]]
//} -
Hash
# eql?(other) -> bool (9457.0) -
自身と other が同じ数のキーを保持し、キーが eql? メソッドで比較して全て等しく、 値が == メソッドで比較して全て等しい場合に真を返します。
自身と other が同じ数のキーを保持し、キーが eql? メソッドで比較して全て等しく、
値が == メソッドで比較して全て等しい場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
#(出力関数は省略)
{ 1 => :a } == { 1 => :a } #=> true
{ 1 => :a } == { 1 => :a, 2 => :b } #=> false
{ 1 => :a } == { 1.0 => :a } #=> fa... -
MatchData
# eql?(other) -> bool (9427.0) -
self と other のマッチ対象になった文字列、元になった正規表現オブジェク ト、マッチした位置が等しければ true を返します。そうでない場合には false を返します。
self と other のマッチ対象になった文字列、元になった正規表現オブジェク
ト、マッチした位置が等しければ true を返します。そうでない場合には
false を返します。
@param other 比較対象のオブジェクトを指定します。
//emlist[文字列][ruby]{
s = "abc"
m1 = s.match("a")
m2 = s.match("b")
m1 == m2 # => false
m2 = s.match("a")
m1 == m2 # => true
//}
//emlist[正規表現][ruby]{
r = /abc/
m1 = r.mat...