るりまサーチ

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

別のキーワード

  1. socket local_creds
  2. socket af_local
  3. socket pf_local
  4. socket local_connwait
  5. socket local_peercred

検索結果

変数と定数 (15121.0)

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

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

Ruby の変数と定数の種別は変数名の最初の一文字によって、
ローカル変数、
インスタンス変数、
クラス変数、
グローバル変数、
定数
のい...
... nil
# 1
# nil <- これが nil であることに注意
# 1
//}

宣言は、たとえ実行されなくても宣言とみなされます。

//emlist[][ruby]{
v = 1 if false # 代入は行われないが宣言は有効
p defined?(v) # => "local-variable"
p v # => nil...
...スま
たはサブクラスのメソッドから参照できます。初期化されていない
インスタンス変数を参照した時の値はnilです。


===[a:class] クラス変数

//emlist[例][ruby]{
class Foo
@@foo = 1
def bar
puts @@foo
end
end
//}

@@で始まる変数は...

ruby 1.8.3 feature (84.0)

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

...dev:26900>)) ((<ruby-dev:27121>))
$ ruby-1.8.2 -e 'p ("x".taint * 0).tainted?'
false


$ ruby-1.8.3 -e 'p ("x".taint * 0).tainted?'
true

$ ruby-1.8.2 -e 'p ("x".taint[1..-1]).tainted?'
false


$ ruby-1.8.3 -e 'p ("x".taint[1..-1]).tainted?'
true

Range オブ...
...:40832>))

=== 2005-06-07
: Module#class_variable_get [ruby] [new]
: Module#class_variable_set [ruby] [new]

クラスメソッドから((<変数と定数/クラス変数>))にアクセスするための
((<Module#class_variable_get|Module/class_variable_get>)) と
((<Module#class_variable_s...
...オプションに -w を付けた時に出ます。((<ruby-dev:26201>))

=== 2005-05-22
: OpenSSL::SSL::SSLServer#initialize(svr, ctx, session_id=nil)
session_id を受け付けるようになりました。((<ruby-core:4663>))

=== 2005-05-19
: REXML::Encoding#decode_sjis [lib] [bug]
: REXML::...