るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

BasicObject#! -> bool (39137.0)

オブジェクトを真偽値として評価し、その論理否定を返します。

...r < BasicObject
def initialize
@count = 0
end
attr_reader :count

def !
@count += 1
super
end
end

recorder = NegationRecorder.new
!
recorder
!
!!!!!!recorder
puts 'hoge' if !recorder

puts recorder.count #=> 3
//}

//emlist[例][ruby]{
class AnotherFalse < BasicObject
def !...

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

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

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

ただし、 BasicObject#!= 自身や BasicObject#! を再定義した際には、ユーザーの責任で
整合性を...
...
@see BasicObject#==, BasicObject#!

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

def !=(other)
@count += 1
super
end
end
recorder = NonequalityRecorder.new

recorder != 1
puts 'hoge' if recorder != "str"

p r...

ruby 1.9 feature (60.0)

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

...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

オプショナル引数の...
...Module#name

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

=== 2006-06-17

: BasicObject#invoke_method
: BasicObject#invoke_functional_method

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

=== 2006-06-13

: IPsocket
: TCPsocket
: SOCKSsocket
: TCPserver
: U...
...: __method__ [new]

((<URL:http://www.dm4lab.to/~usa/ruby/d/200606a.html#id20060610_P1_7>))

: Symbol#to_proc

=== 2006-06-10

* 新機能
: BasicObject が導入されました [new]
: local という visibility および Module#local, Module#local_methods というメソッドが導入され...

NEWS for Ruby 3.0.0 (30.0)

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

...ad of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slice / Array#[]
* Array#take
* Array#take_while
* Array#uniq
* Array#*
* Can be sliced with Enumerator::A...
...g major collections. At the moment, compaction adds significant overhead to major collections, so please test first! 17176
* Hash
* Hash#transform_keys and Hash#transform_keys! now accept a hash that maps keys to new keys. 16274
* Hash#except has been added, which returns a hash excludi...
...ol. 17314

//emlist[][ruby]{
class C; end
module M1; end
module M2; end
C.include M1
M1.include M2
p C.ancestors #=> [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...

Ruby用語集 (18.0)

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

...前。

: shebang
シバンまたはシェバンと読む。
一般に Unix 系 OS のスクリプトにおいて、第 1 行に配置される #! で始まる行をいう。
スクリプトを処理すべき処理系やそのコマンドラインオプションを指定するのに
用い...
...と呼ぶ。
「親クラス」「上位クラス」と呼ぶこともある。

Ruby では BasicObject を除くすべてのクラスがただ一つの
スーパークラスを持つ(BasicObject はスーパークラスを持たない)。
スーパークラスは Class#superclass で...
...ールの mix-in という仕組みがある。

→ミックスイン

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

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

: 短絡評価
: short-circuit evaluation
論理式の評...

絞り込み条件を変える