るりまサーチ

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

別のキーワード

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

検索結果

クラス/メソッドの定義 (15049.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...
...ray を明示的に指定しても同じ)
class Foo
def bar
end
end

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

クラス定義式の中は self がそのクラスであることと、
limitのデ...
...を参照してください。

//emlist[][ruby]{
class Foo
def foo
def bar
p :bar
end
end

def Foo.method_added(name)
puts "method \"#{name}\" was added"
end
end
obj = Foo.new
obj.bar rescue nil # => undefined method `bar' for #<Foo:0x4019eda4>
obj.foo # => meth...

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

...fix として 0d が追加されました。
8進リテラルの prefix として 0 以外に 0o が追加されました。

Integer(), String#to_i、String#oct もこの prefix を認識します。

: ((<メソッド引数の & 修飾|メソッド呼び出し/イテレータ>)) [compat]
: ((<...
...(C の do ... while 構文と同じ)をしていませんでした。
((<ruby-list:34618>))

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

メソッド定義のほかにもクラス定義やモジュール定義にもrescue/ensureを
つけ...
...なりました。
((<ruby-core:00927>))


: ((<NameError>)) & ((<NoMethodError>)) [change]

Name
Error を StandardError のサブクラスに戻しました。
クラス階層は以下のようになりました。

NoMethodError < NameError < StandardError.

: ((<Interrupt>))...

ruby 1.6 feature (342.0)

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

...:EWOULDBLOCK

=> 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-2...
...りました。

p "#{ "" }"

=> ruby 1.6.7 (2002-03-01) [i586-linux]
""

=> -:1: warning: bad substitution in string
ruby 1.6.7 (2002-09-12) [i586-linux]
"#{ }"

=> ruby 1.6.7 (2002-09-25) [i586-linux]
""

これは1.7...
...p Marshal.dump(Object.new).unpack("CC").join(".")
=> ruby 1.6.4 (2001-06-11) [i586-linux]
"4.6"

: $SAFE / ((<クラス/メソッドの定義/def>))

doc/NEWS には

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

とある...

ruby 1.8.3 feature (60.0)

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

...convert Fixnum into String (TypeError)
from -e:1

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

与えられた pathname がピリオドで終る場合、ピリオドではなく空の文字列を返すようになりました。

$ ruby-1.8.2 -e 'p File.extname("a.")'
"."...
...$ ruby-1.8.3 -e 'p File.extname("a.")'
""

=== 2005-09-13
: Logger#formatter [lib] [new]
: Logger#formatter= [lib] [new]
: Logger::Formatter [lib] [new]

追加。

=== 2005-09-13
: Net::HTTP

https での Proxy 認証をサポートするようになりました。

: Net::HTTP.post_form...
...2005-02-17
: Open3.popen3 [lib] [compat]
Open3.popen3実行後の$?.exitstatusが0になるように修正されました。

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