るりまサーチ

最速Rubyリファレンスマニュアル検索!
109件ヒット [1-100件を表示] (0.036秒)
トップページ > クエリ:self[x] > クエリ:superclass[x]

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

検索結果

<< 1 2 > >>

static VALUE superclass(VALUE self, NODE *node) (38200.0)

クラス文のスーパークラスを表すノード node を 評価してクラスを得ます。

クラス文のスーパークラスを表すノード node を
評価してクラスを得ます。

1.6.8から1.8.0への変更点(まとめ) (132.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...ました
((<ruby-bugs-ja:313>))。なんだかよくわかりません(^^;

class << Object
p [self.id, self]
class << self
p [self.id, self]
end
end
=> ruby 1.6.7 (2002-03-01) [i586-linux]
[537771634, Class]...
...あっぱりわかりません(^^;;

class << Object.new
class << self.superclass
p [self.id, self]
end
class << self
p [self.superclass.id, self.superclass]
end
end
=> ruby 1.6.7 (2002-03-01) [i586-linux]...
...[new]

追加

: ((<Array#insert|Array/insert>)) [new]

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

(({ary[n,0] = [other,...]})) と同じ(ただし self を返す)

=== Class

: ((<Class#allocate|Class/allocate>)) [new]

allocate と initialize の二つのメソッドでオブジェクト...

ruby 1.6 feature (84.0)

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

...の戻り値

以下のメソッドの戻り値が正しくなりました。((<ruby-bugs-ja:PR#205>))

* ((<Enumerable/each_with_index>)) が self を返すようになった(以前は nil)
* ((<Process/Process.setpgrp>)) が返す値が不定だった。
* ((<String/ljust>)), ((<String/rju...
...なくても常に dup した文字列を返すようになった

: 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 @...
...スーパークラスが反映されていません
でした。((<ruby-bugs-ja:PR#87>))

class A
p self.id
end
class A < String
p self.id
p self.superclass
end

=> ruby 1.6.5 (2001-09-19) [i586-linux]
537760880
-:4: warning: already initialized...

クラス/メソッドの定義 (78.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

...class Foo < Super
def test
# ...
end
# ...
end
//}

文法:

class 識別子 [`<' superclass ]
式..
end

文法:

class 識別子 [`<' superclass ]
式..
[rescue [error_type,..] [=> evar] [then]
式..].....
...ef bar
end
end

# 間違ったスーパークラスを指定するとエラー
class Foo < String
end
# => superclass mismatch for class Foo (TypeError)
//}

クラス定義式の中は self がそのクラスであることと、
limitのデフォルトが異なること以外
にトップレベ...
...の外でも良い
def Hoge.bar
end

# 以下のようにすればクラス名が変わってもメソッド部の変更が不要
class Hoge
def self.baz
'To infinity and beyond!'
end
end

# 特異クラス方式。複数のメソッドを一度に定義するとき向き
class << Hoge
def...

Ruby用語集 (72.0)

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

...N の加算を行うと、Integer 側では相手が未知のため、自身を引数に
まず相手側の N#coerce を呼ぶ。N#coerce では self と引数を、既に加算が定義された
オブジェクトのペアに変換して返す。Integer 側ではそれらの加算を行う。...
...込みや
アプリケーションソフト組込みに適した特徴を持つ。

https://mruby.org/

: main
トップレベルにおける self。Object クラスのインスタンスである。

===[a:N] N

: nil
NilClass の唯一のインスタンス。また、そのオブジェク...
...、true 以外のオブジェクトを
返すことで、単なる真偽を越えた情報を与えるものもある。

: 上位クラス
: superclass
=スーパークラス

: 条件演算子
: conditional operator
条件式・真式・偽式の三つの項を取り、条件式の値が...

絞り込み条件を変える

クラス/メソッドの定義 (66.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

...class Foo < Super
def test
# ...
end
# ...
end
//}

文法:

class 識別子 [`<' superclass ]
式..
end

文法:

class 識別子 [`<' superclass ]
式..
[rescue [error_type,..] [=> evar] [then]
式..].....
...ef bar
end
end

# 間違ったスーパークラスを指定するとエラー
class Foo < String
end
# => superclass mismatch for class Foo (TypeError)
//}

クラス定義式の中は self がそのクラスであることと、
limitのデフォルトが異なること以外
にトップレベ...
...の外でも良い
def Hoge.bar
end

# 以下のようにすればクラス名が変わってもメソッド部の変更が不要
class Hoge
def self.baz
'To infinity and beyond!'
end
end

# 特異クラス方式。複数のメソッドを一度に定義するとき向き
class << Hoge
def...

Method#super_method -> Method | nil (28.0)

self 内で super を実行した際に実行されるメソッドを Method オブジェ クトにして返します。

...
self
内で super を実行した際に実行されるメソッドを Method オブジェ
クトにして返します。

@see UnboundMethod#super_method

//emlist[例][ruby]{
class Super
def foo
"superclass method"
end
end

class Sub < Super
def foo
"subclass method"
end
end

m = S...
...ub.new.method(:foo) # => #<Method: Sub#foo>
m.call # => "subclass method"
m.super_method # => #<Method: Super#foo>
m.super_method.call # => "superclass method"
//}...

ruby 1.8.2 feature (24.0)

ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。

...バグを修正しました。((<ruby-dev:23690>))

$ ruby1.8.1 -e 'class X;end; x=X.new; class << x;p self < X; end'
true

$ ruby1.8.2 -e 'class X;end; x=X.new; class << x;p self < X; end'
nil

=== 2004-06-04

: IO#gets, $_ [ruby] [change]
gets の返り値が nil でも、$_...
...000def\000".unpack("Z*Z*")'
["abc\000def", ""]

$ ruby1.8.2 -e 'p "abc\000def\000".unpack("Z*Z*")'
["abc", "def"]

=== 2004-05-10
: superclass mismatch [ruby] [change]
親クラスの違う同じ名前のクラスを再定義した時 TypeError を投げるようになりました...
...(<ruby-list:39567>))

$ ruby-1.8.2 -e '
class Foo
Bar = 1
end

class Foo < String
Baz = 2
end
'
-e:6: superclass mismatch for class Foo (TypeError)

=== 2004-04-19

: Hash#== [change]
: Hash#eql? [new]

Hash#== は内容が一致していれば真に...

ruby 1.8.3 feature (24.0)

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

...101 #=> @@foo は Fred クラスのクラス変数ではない。
end

def Fred.foo_foo
class_variable_set(:@@foo, 101) # self が Fred クラス自身であることに注意。クラス変数 @@foo に値をセットする。
end

Fred.foo # メソ...
...singleton class [ruby] [change]
特異クラスは複製できなくなりました。((<ruby-talk:142749>))

$ ruby-1.8.3 -e 'class << "str"; self end.dup'
-e:1:in `initialize_copy': can't copy singleton class (TypeError)
from -e:1

=== 2005-05-15
: Pathname#unlink [lib] [comp...
...er [lib] [bug]

継承するとエラーになるバグを修正。 ((<ruby-talk:126104>))

=== 2005-01-12
: Class#superclass [ruby] [bug]
特異クラスのメソッド superclass が特異クラスを返すように修正されました。
((<ruby-list:40519>))

=== 2005-01-09

: IO#read [ob...

ruby 1.8.4 feature (18.0)

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

...ing eval should preserve external
# information.

: super [bug]

Kernelのメソッド内でsuperを呼んだ時に、存在しないsuperclass
にアクセスしようとするバグの修正。

module Kernel
def foo
super
end
end...
...# => ruby 1.8.4 (2005-12-22) [i686-linux]
-:3:in `foo'-:3: warning: too many arguments for format string
: super: no superclass method `foo' (NoMethodError)
from -:7

: 正規表現 [bug]

#Wed Oct 19 01:27:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>...
...super
end
end

class Bar
include Foo
def initialize
Foo.instance_method(:initialize).bind(self).call
end
end

Bar.new

# => ruby 1.8.3 (2005-09-21) [i686-linux]
-:3:in `initialize': method `initi...

絞り込み条件を変える

Object#class -> Class (12.0)

レシーバのクラスを返します。

...レシーバのクラスを返します。

//emlist[][ruby]{
p "ruby".class #=> String
p 100.class #=> Integer
p ARGV.class #=> Array
p self.class #=> Object
p Class.class #=> Class
p Kernel.class #=> Module
//}

@see Class#superclass,Object#kind_of?,Object#instance_of?...
<< 1 2 > >>