るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.211秒)
トップページ > クエリ:@[x] > クエリ:error[x] > クエリ:クラス/メソッドの定義[x]

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document to_s
  4. rexml/document clone
  5. rexml/document node_type

検索結果

クラス/メソッドの定義 (15121.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
* d...
...別子 [`<' superclass ]
式..
end

文法:

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

クラスを...
...@x, @yに対応するゲッタとセッタを定義
def initialize(x, y) # コンストラクタ
@
x = x; @y = y # @がつくのがインスタンス変数(メンバ変数)
end
def ==(other_vec) # いわゆる演算子オーバーライド
other_vec.x == @x && other_vec.y == @...

ruby 1.6 feature (96.0)

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

...ULDBLOCK

=> ruby 1.6.8 (2002-12-24) [i586-linux]
Errno::EAGAIN
-:2: uninitialized constant EWOULDBLOCK at Errno (NameError)

=> ruby 1.6.8 (2003-02-13) [i586-linux]
Errno::EAGAIN
Errno::EAGAIN

== 1.6.7 (2002-03-01) -> 1.6.8 (2002-12-24)...
...NameError を起こ
すようになりました。((<ruby-bugs-ja:PR#216>))

Object.new.instance_eval {
p remove_instance_variable :@foo
}
=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil

=> -:2:in `remove_instance_variable': instance variable @foo...
...(<クラス/メソッドの定義/def>))

doc/NEWS には

Fixed so defining a new method is allowed under $SAFE == 4, which
previously wasn't.

とあるけど実際にはできません。

$SAFE = 4; def a; end

=> -:1: Insecure operation `(null)' at level 4 (SecurityError)...

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

...。break が例外になる。

Proc.new {|a,b,c| p [a,b,c]}.call(1,2)
=> -:1: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002-12-24) [i586-linux]...
...(C の do ... while 構文と同じ)をしていませんでした。
((<ruby-list:34618>))

: ((<"rescue/ensure on class/module"|クラス/メソッドの定義/クラス定義>)) [compat]

メソッド定義のほかにもクラス定義やモジュール定義にもrescue/ensureを
つけ...
...することにより定数参照の速度を改善したそうです。
(ChangeLogの
Tue Jun 5 16:15:58 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
に該当するようです)

: break and next [compat]

break, next は、引数を指定することでイテレータや y...

ruby 1.8.3 feature (18.0)

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

...ruby-1.8.2 -e 'p File.join(1, 2)'
"1/2"

$ ruby-1.8.3 -e 'p File.join(1, 2)'
-e:1:in `join': can't convert Fixnum into String (TypeError)
from -e:1

=== 2005-09-16
: File.extname [ruby] [compat]

与えられた pathname がピリオドで終る場合、ピリオドで...
...y-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 が Fred ク...
...popen3 [lib] [compat]
Open3.popen3実行後の$?.exitstatusが0になるように修正されました。

: ((<クラス/メソッドの定義/defined?>)) [ruby][bug]
(({defined?(@a = b)}))のような NODE_IASGN が nil ではなく
"assignment" を返すようになりました。
((<"[...