るりまサーチ

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

別のキーワード

  1. argf.class lines
  2. argf.class each
  3. argf.class each_line
  4. class new
  5. argf.class readline

検索結果

1.6.8から1.8.0への変更点(まとめ) (295.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への変更点(まとめ)/サポートプラットフォームの追加>))

...よくわかりません(^^;

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]
[537742484, Class]
=> ruby 1.7.3 (2002-09...
...-05) [i586-linux]
[537771634, #<Class:Object>]
[537771634, #<Class:Object>]

さらに、オブジェクトの特異クラスのスーパークラスの特異クラスと
オブジェクトの特異クラスの特異クラスのスーパークラスは同じなのだそう...
...(^^;;

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]
[537771634, Class]...

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

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

...:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* defined

===[a:class] クラス定義

//emlist[例][ruby]{
class
Foo < S...
...uper
def test
# ...
end
# ...
end
//}

文法:

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

文法:

class
識別子 [`<' superclass ]
式..
[rescue [error_type,..] [=> evar] [then]
式..]..
[else...
...ラス定義は、識別子で指定した定数へのクラスの代入になります
(Ruby では、クラスもオブジェクトの一つで Classクラスの
インスタンスです)。

クラスが既に定義されているとき、さらに同じクラス名でクラス定義を書くと...

ruby 1.6 feature (247.0)

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

...module_eval>)) のブロック内で定数やクラス変数のスコープが
変わることはなくなりました。((<ruby-dev:17876>))

class
Foo
FOO = 1
@@foo = 1
end

FOO = 2
@@foo = 2

Foo.module_eval { p FOO, @@foo }

=...
...列を返すようになった

: 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 @@cv in C (NameError)
fr...
...定義形式で特異メソッドを定義できるようにな
りました。

class
<<true
def foo
"foo"
end
end
p true.foo
=> -:1: no virtual class for true (TypeError)
ruby 1.6.6 (2001-12-26) [i586-linux]

=> ru...

Ruby用語集 (121.0)

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

...

https://mruby.org/

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

===[a:N] N

: nil
NilClass の唯一のインスタンス。また、そのオブジェクトを指す擬似変数の名前。
論理値としては偽である。

Ruby...
...し、切り替えて使うための
ツールの一つ。Linux、macOS などで動作する。

https://github.com/rbenv/rbenv

: RD(Ruby Document format)
Ruby スクリプト中に記述することを念頭に作られたドキュメントフォーマット。

: RDoc
Ruby スクリ...
...、true 以外のオブジェクトを
返すことで、単なる真偽を越えた情報を与えるものもある。

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

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

ruby 1.8.3 feature (97.0)

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

...は、$SAFE レベル が 0 のとき
禁止されるようになりました。

$ cat mthd_taint.rb
th = Thread.new{
$SAFE = 3
class
Hoge
def foo
puts "safe level: #{$SAFE}"
end
end
}
th.join
p $SAFE
Hoge.new.foo

$ ruby...
...: Module#class_variable_get [ruby] [new]
: Module#class_variable_set [ruby] [new]

クラスメソッドから((<変数と定数/クラス変数>))にアクセスするための
((<Module#class_variable_get|Module/class_variable_get>)) と
((<Module#class_variable_set|Module/class_variable_...
...した。((<ruby-talk:144741>))

class
Fred
@@foo = 99
def foo
@@foo
end
end

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

def Fred.foo_foo
class
_variable_set(:@@foo, 101) # self...

絞り込み条件を変える

ruby 1.8.2 feature (55.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 の返り...
...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#== は内容が一致していれば真に、Hash#eql? は、さらに
ハッシュのデフォルト値が同じ(==)なら真になるよう定義されま...

ruby 1.8.4 feature (37.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...
...t string
: super: no superclass method `foo' (NoMethodError)
from -:7

: 正規表現 [bug]

#Wed Oct 19 01:27:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * regex.c (re_compile_pattern): numeric literal inside character class
# disabled succeeding b...
...= 組み込みライブラリ

#Thu Dec 8 02:07:19 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * eval.c (umethod_bind): adjust invoking class for module method.
# [ruby-dev:27964]

: UnboundMethod#bind [bug]

UnboundMethod#bindされたモジュールのインスタンスメ...