るりまサーチ

最速Rubyリファレンスマニュアル検索!
14件ヒット [1-14件を表示] (0.170秒)
トップページ > クエリ:I[x] > クエリ:a[x] > クエリ:of[x] > クエリ:変数と定数[x]

別のキーワード

  1. fileutils options_of
  2. _builtin of
  3. objspace memsize_of
  4. objspace memsize_of_all
  5. rake kind_of?

検索結果

変数と定数 (21201.0)

変数と定数 * local * instance * class * class_var_scope * global * pseudo * const * prio

...変数と定数
* local
* instance
* class
* class_var_scope
* global
* pseudo
* const
* prio

Ruby の変数と定数の種別は変数名の最初の一文字によって、
ローカル変数、
インスタンス変数、
クラス変数、
グローバル変数、
定数
のい...
...部には
「`$'+1文字の記号」という変数があります(builtinを参照)。変数名
の長さにはメモリのサイズ以外の制限はありません。

===[a:local] ローカル変数

//emlist[例][ruby]{
foobar
//}

小文字または`_'で始まる識別子はローカル変数...
...参照した際に例外 RuntimeError が発生します。

//emlist[][ruby]{
class Foo
end

class Bar < Foo
@@v = :bar
end

class Foo
@@v = :foo
end

class Bar
p @@v #=> RuntimeError (class variable @@v of Bar is overtaken by Foo)
end
//}


====[a:class_var_scope] クラス変数のス...

ruby 1.8.3 feature (3072.0)

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

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

ruby 1.8.2 から ruby 1.8.3 までの変更点です。

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリ...
...変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影...
...[lib] [new]
: FileUtils.chmod_R [lib] [new]
: FileUtils.chown [lib] [new]
: FileUtils.chown_R [lib] [new]
: FileUtils.commands [lib] [new]
: FileUtils.options [lib] [new]
: FileUtils.have_option? [lib] [new]
: FileUtils.options_of...