るりまサーチ

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

別のキーワード

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

検索結果

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

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

クラス定義式の中は self がそのクラスであることと、
limitのデフォルトが...
...self._val + other._val
end
end
//}

=== 定義に関する操作

====[a:alias] alias

//emlist[例][ruby]{
alias foo bar
alias :foo :bar
alias $MATCH $&
//}

文法:

alias 新メソッド名 旧メソッド名
alias 新グローバル変数名 旧グローバル変数名...

1.6.8から1.8.0への変更点(まとめ) (690.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を
つけ...
...: ((<File/File.extname>)) [new]

追加。ファイル名の拡張子を返します。((<ruby-talk:37617>))

: ((<File/File.fnmatch>)) [new]
: ((<File/File.fnmatch?>)) [new]
追加

このメソッドで使用するフラグ FNM_NOESCAPE, FNM_PATHNAME, FNM_PERIOD,
FNM_CASEFOLD も((...

ruby 1.6 feature (318.0)

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

...りました。

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...
...foo = "foo"
p foo["bar"] = "baz"
p foo

=> ruby 1.6.7 (2002-03-01) [i586-linux]
"baz"
"foo"
=> -:2:in `[]=': string not matched (IndexError)
from -:2
ruby 1.6.7 (2002-07-30) [i586-linux]

: 2002-06-03 sprintf()

"%d" で引数を整数にする...
...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.

とある...