るりまサーチ

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

別のキーワード

  1. basicobject __send__
  2. basicobject instance_eval
  3. _builtin basicobject
  4. basicobject !=

ライブラリ

クラス

キーワード

検索結果

BasicObject#==(other) -> bool (27124.0)

オブジェクトが other と等しければ真を、そうでない場合は偽を返します。

...[ruby]{
class Person < BasicObject
def initialize(name, age)
@name = name
@age = age
end
end

tanaka1 = Person.new("tanaka", 24)
tanaka2 = Person.new("tanaka", 24)

tanaka1 == tanaka1 #=> true
tanaka1 == tanaka2 #=> false
//}

@see BasicObject#equal?, Object#==, Object#equal?,...

BasicObject#!=(other) -> bool (9042.0)

オブジェクトが other と等しくないことを判定します。

...トでは self == other を評価した後に結果を論理否定して返します。
このため、サブクラスで BasicObject#== を再定義しても != とは自動的に整合性が
とれるようになっています。

ただし、 BasicObject#!= 自身や BasicObject#! を再定義...
...義するものと想定されています。

@param other 比較対象となるオブジェクト
@see BasicObject#==, BasicObject#!

//emlist[例][ruby]{
class NonequalityRecorder < BasicObject
def initialize
@count = 0
end
attr_reader :count

def !=(other)
@count += 1
super...

BasicObject#__id__ -> Integer (9036.0)

各オブジェクトに対して一意な整数を返します。あるオブジェクトに対し てどのような整数が割り当てられるかは不定です。

...すが、#object_id は BasicObject
はない事に注意してください。

//emlist[例][ruby]{
# frozen_string_literal: false
obj = Object.new
obj.object_id == obj.__id__ # => true
Object.new.__id__ == Object.new.__id__ # => false
(21 * 2).__id__ == (21 * 2).__id__ # =...
...> true
"hello".__id__ == "hello".__id__ # => false
"hi".freeze.__id__ == "hi".freeze.__id__ # => true
//}

@see Object#object_id, 42840...

BasicObject#equal?(other) -> bool (9018.0)

オブジェクトが other と同一であれば真を、そうでない場合は偽を返します。

...ものであるかどうかを判定します。
一般にはこのメソッドを決して再定義すべきでありません。
ただし、 BasicObject の位置づけ上、どうしても再定義が必要な用途もあるでしょう。
再定義する際には自分が何をしているの...
...ない場合は偽

//emlist[例][ruby]{
original = "a"
copied = original.dup
substituted = original

original == copied #=> true
original == substituted #=> true
original.equal? copied #=> false
original.equal? substituted #=> true
//}

@see Object#equal?, Object#==, Object#eql?...

NEWS for Ruby 3.0.0 (66.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストはリンク先を参照してください。

==
言語仕様の変更

* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2....
...a warning.

==
Command line options

==
= `--help` option

When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754

==
= `--backtrac...
...tors #=> [C, M1, M2, Object, Kernel, BasicObject]
//}

* Mutex
* `Mutex` is now acquired per-`Fiber` instead of per-`Thread`. This change should be compatible for essentially all usages and avoids blocking when using a scheduler. 16792
* Proc
* Proc#== and Proc#eql? are now defined and w...

絞り込み条件を変える

Ruby用語集 (36.0)

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

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

a ka sa ta na ha ma ya ra wa

==
= 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。

参照:d:spec/literal#percent

: 0 オリジン
: zero-ba...
...チャーの番号、
Ruby 2.7 で導入された番号指定ブロックパラメーター、
といったものは 1 オリジンである。

==
=[a:A] A

: AWK
テキスト処理に適したプログラミング言語。
名称は、開発者である Aho(エイホ)、Weinberger(ワ...
...と呼ぶ。
「親クラス」「上位クラス」と呼ぶこともある。

Ruby では BasicObject を除くすべてのクラスがただ一つの
スーパークラスを持つ(BasicObject はスーパークラスを持たない)。
スーパークラスは Class#superclass で...

ruby 1.9 feature (30.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...ムの追加

==
1.9.0

==
= 2006-09-16

: Struct#inspect

==
= 2006-09-14

: digest.rb
: Digest::Base.file

==
= 2006-09-13

: Hash#compare_by_identity
: Hash#compare_by_identity?
: Hash#identical
: Hash#identical?

==
= 2006-09-12

: Hash#compare_by_identity
: Hash#compare_by_identity?

==
= 2006-09-11...
...: Hash#identical
: Hash#identical?

==
= 2006-08-31

: Array#shuffle
: Array#shuffle!

追加

==
= 2006-07-26

: __send
: __send!

追加

: invoke_method
: invoke_functional_method

削除

==
= 2006-07-21

: Module#attr

オプショナル引数の assignable がなくなり、attr_reader...
...りました
[RCR#331]

==
= 2006-06-22

: Module#name

無名モジュールに対しては nil を返すようになりました
[ruby-talk:198440]

==
= 2006-06-17

: BasicObject#invoke_method
: BasicObject#invoke_functional_method

追加
((<ruby-talk:197512>))

==
= 2006-06-13

: IPsocke...

NEWS for Ruby 2.4.0 (18.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...てください。

==
2.3.0 以降の変更

==
= 言語仕様の変更

* 条件式での多重代入ができるようになりました 10617
* Symbol#to_proc でメソッド呼び出し元での Refinements が有効になりました 9451
* Object#send や BasicObject#__send__ でメソ...
...cue をメソッドの引数内に書けるようになりました 12686
* トップレベルで return を書けるようになりました 4840

==
= 組み込みクラスの更新

* Array
* Array#concat 12333
複数の引数を取れるようになりました。
* Array#max, A...
...ます。
12299

==
= 標準添付ライブラリの更新 (優れたもののみ)

* cgi
* "," をクッキーの区切り文字として許可しなくなりました 12791

* csv
* liberal_parsing オプションを追加 11839

* ipaddr
* IPAddr#==, IPAddr#<=> で引数の...