るりまサーチ

最速Rubyリファレンスマニュアル検索!
92件ヒット [1-92件を表示] (0.123秒)
トップページ > クエリ:i[x] > クエリ:instance[x] > クエリ:constants[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. csv to_i

検索結果

Module#constants(inherit = true) -> [Symbol] (18267.0)

そのモジュール(またはクラス)で定義されている定数名の配列を返します。

...します。

i
nherit に真を指定すると
スーパークラスやインクルードしているモジュールの定数も含みます。
Object のサブクラスの場合、Objectやそのスーパークラスで定義されている
定数は含まれません。 Object.constants とする...
...am inherit true を指定するとスーパークラスや include したモジュールで
定義された定数が対象にはなります。false を指定した場合 対象にはなりません。

@see Module.constants, Kernel.#local_variables, Kernel.#global_variables, Object#instance_...
...variables, Module#class_variables

//emlist[Module.constants と Module#constants の違い][ruby]{
# 出力の簡略化のため起動時の定数一覧を取得して後で差し引く
$clist = Module.constants

class Foo
FOO = 1
end
class Bar
BAR = 1

# Bar は BAR を含む
p constants...

Object#instance_variables -> [Symbol] (12231.0)

オブジェクトのインスタンス変数名をシンボルの配列として返します。

...列として返します。

//emlist[][ruby]{
obj = Object.new
obj.instance_eval { @foo, @bar = nil }
p obj.instance_variables

#=> [:@foo, :@bar]
//}

@see Object#instance_variable_get, Kernel.#local_variables, Kernel.#global_variables, Module.constants, Module#constants, Module#class_variables...

Kernel.#global_variables -> [Symbol] (6118.0)

プログラム中で定義されているグローバル変数(`$'で始まる変数)名の 配列を返します。

...グラム中で定義されているグローバル変数(`$'で始まる変数)名の
配列を返します。

//emlist[例][ruby]{
p global_variables #=> [:$;, :$-F, :$@, ... ]
//}

@see Kernel.#local_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables...

Kernel.#local_variables -> [Symbol] (6118.0)

現在のスコープで定義されているローカル変数名の配列を返します。

...現在のスコープで定義されているローカル変数名の配列を返します。

//emlist[例][ruby]{
yuyu = 0
p local_variables #=> [:yuyu]
//}

@see Kernel.#global_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables...

Module#class_variables(inherit = true) -> [Symbol] (6118.0)

クラス/モジュールに定義されているクラス変数の名前の配列を返します。

...am inherit false を指定しない場合はスーパークラスやインクルードして
いるモジュールのクラス変数を含みます。

//emlist[例][ruby]{
class One
@@var1 = 1
end
class Two < One
@@var2 = 2
end
One.class_variables # => [:@@var1]
Two.class_variab...
...les # => [:@@var2, :@@var1]
Two.class_variables(false) # => [:@@var2]
//}

@see Module.constants, Kernel.#local_variables, Kernel.#global_variables, Object#instance_variables, Module#constants...

絞り込み条件を変える

ruby 1.6 feature (1152.0)

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

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

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) ->...
...2-04-11: IO#write

ソケットやパイプに対する EPIPE の検出に失敗することがありました。
((<ruby-dev:16849>))

: 2002-04-11: ((<"cgi/session">)) (*ドキュメント未反映*)

support for multipart form.

: 2002-04-10: Object#((<Object/remove_instance_variable>))...
...* IO#each_byte が self を返すようになった(以前は nil)

: rb_define_module_under()

C 関数 rb_define_module_under() でモジュールを定義するときに同名の定
数が既に定義されていると失敗していました。((<ruby-talk:30203>))

Constants
= 1...

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

...の変更点(まとめ)/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...
...((<Signal>)) モジュール [new]
: ((<Process::Status>)) [new]
: ((<NoMethodError>)) [new]

((<Process::Status>)) の追加により、(({$?})) の値も整数からこのクラ
スのインスタンスになりました。

=== クラス階層

: ((<File::Constants>))

File:...
...odule#private_method_defined?|Module/private_method_defined?>)) [new]
: ((<Module#protected_method_defined?|Module/protected_method_defined?>)) [new]

: ((<Module#public_method_defined?|Module/public_method_defined?>)) [new]
: ((<Object#methods|Object/methods>)) [change]
: ((<Module#instance_methods...

NEWS for Ruby 3.0.0 (42.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting...
...s method definition is added. [EXPERIMENTAL]
16746

//emlist{
def square(x) = x * x
//}

* Interpolated String literals are no longer frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}...
...tion shows the help message via the pager designated by the value.
16754

=== `--backtrace-limit` option

The `--backtrace-limit` option limits the maximum length of a backtrace.
8661

== Core classes updates

Outstanding ones only.

* Array
* The following methods now return Array instances i...

NEWS for Ruby 2.0.0 (36.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に...
...は ENV.to_hash へのエイリアスです

* Fiber
* 非互換: Fiber#resume は Fiber#transfer を呼び出したファイバーを再開できなくなりました

* File
* 拡張: File.fnmatch? は File::FNM_EXTGLOB(File::Constants::FNM_EXTGLOB) オプションが与えられて...
...ead#thread_variables スレッドローカルな変数の名前のリストを取得します
* 追加: Thread#thread_variable? 与えられた名前がスレッドローカルな変数であるかどうか返します
* 追加: Thread.handle_interrupt as well as instance and singleton metho...