ライブラリ
- ビルトイン (52)
- json (33)
-
ripper
/ lexer (7)
クラス
-
JSON
:: State (22) - Random (11)
- Ripper (7)
- Thread (19)
キーワード
-
abort
_ on _ exception= (11) -
from
_ state (11) -
latest
_ gc _ info (22) - lex (7)
- new (11)
-
report
_ on _ exception= (8)
検索結果
先頭5件
-
JSON
. state -> JSON :: Ext :: Generator :: State (24415.0) -
JSON ライブラリがジェネレータの状態を表すクラスとして使用するクラスを返します。
...JSON ライブラリがジェネレータの状態を表すクラスとして使用するクラスを返します。
//emlist[例][ruby]{
require "json"
JSON.state # => JSON::Ext::Generator::State
//}... -
Random
. state -> Integer (24202.0) -
C言語レベルで定義されている構造体MTの静的変数default_randの状態を参照します。詳しくはrandom.c を参照してください。
C言語レベルで定義されている構造体MTの静的変数default_randの状態を参照します。詳しくはrandom.c を参照してください。 -
JSON
:: State . from _ state(options) -> JSON :: State (18527.0) -
与えられた options によって生成した JSON::State のインスタンスを返します。
...JSON::State のインスタンスを返します。
@param options JSON::State のインスタンスか、ハッシュを指定します。
@return options がハッシュである場合は、それによって初期化した JSON::State を
返します。options が JSON::State のイ......いない JSON::State の
インスタンスを返します。
//emlist[例 Hash を指定][ruby]{
require "json"
json_state = JSON::State.from_state(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}
//emlist[例 JSON::State を指定][ruby]{......require "json"
json_state = JSON::State.from_state(indent: "\t")
# JSON を出力する何らかの処理を実行する
copy = JSON::State.from_state(json_state)
copy.class # => JSON::Ext::Generator::State
copy.indent # => "\t"
//}... -
JSON
:: State . new(options = {}) -> JSON :: State (6268.0) -
自身を初期化します。
...require "json"
json_state = JSON::State.new(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}
//emlist[例 JSON::State を指定][ruby]{
require "json"
json_state = JSON::State.new(indent: "\t")
copy = JSON::State.new(json_state)
copy.class # => JS... -
Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1) -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (214.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。
...です。
: 種類 (Symbol)
トークンの種類が「:on_XXX」の形式のシンボルで渡されます。
: トークン (String)
トークン文字列です。
: ステート (Ripper::Lexer::State)
トークンの状態を表す Ripper::Lexer::State のインスタンスです。... -
Ripper
. lex(src , filename = & # 39;-& # 39; , lineno = 1 , raise _ errors: false) -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (214.0) -
Ruby プログラム str をトークンに分割し、そのリストを返します。 ただし Ripper.tokenize と違い、トークンの種類と位置情報も付属します。
...です。
: 種類 (Symbol)
トークンの種類が「:on_XXX」の形式のシンボルで渡されます。
: トークン (String)
トークン文字列です。
: ステート (Ripper::Lexer::State)
トークンの状態を表す Ripper::Lexer::State のインスタンスです。... -
Thread
. abort _ on _ exception=(newstate) (201.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、インタプリタ 全体を中断させます。false の場合、あるスレッドで起こった例外は、Thread#join などで検出されない限りそのスレッドだけをなにも警告を出さずに終了させます。
...にも警告を出さずに終了させます。
デフォルトは false です。
c:Thread#exceptionを参照してください。
@param newstate スレッド実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
/... -
Thread
. report _ on _ exception=(newstate) (201.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...なかったりするかもしれません。
スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。... -
GC
. latest _ gc _ info(key) -> object (31.0) -
最新のGCの情報を返します。
...//emlist[例][ruby]{
latest = GC.latest_gc_info
latest # => {:major_by=>nil, :gc_by=>:newobj, :have_finalizer=>false, :immediate_sweep=>false, :state=>:sweeping}
stat = GC.stat
merged = GC.latest_gc_info(stat)
merged == latest.merge(stat) # => true
GC.latest_gc_info(:gc_by) # => :newobj
//}... -
GC
. latest _ gc _ info(result _ hash = {}) -> Hash (31.0) -
最新のGCの情報を返します。
...//emlist[例][ruby]{
latest = GC.latest_gc_info
latest # => {:major_by=>nil, :gc_by=>:newobj, :have_finalizer=>false, :immediate_sweep=>false, :state=>:sweeping}
stat = GC.stat
merged = GC.latest_gc_info(stat)
merged == latest.merge(stat) # => true
GC.latest_gc_info(:gc_by) # => :newobj
//}...