種類
- インスタンスメソッド (5)
- 文書 (3)
- モジュール (2)
ライブラリ
- json (7)
クラス
-
JSON
:: State (4)
キーワード
- Integer (2)
-
NEWS for Ruby 2
. 5 . 0 (1) -
NEWS for Ruby 2
. 7 . 0 (1) -
NEWS for Ruby 3
. 0 . 0 (1) -
buffer
_ initial _ length (1) - depth (1)
- depth= (1)
-
max
_ nesting (1) -
to
_ json (1)
検索結果
先頭5件
-
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (60442.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//} -
JSON
:: Ext :: Generator :: GeneratorMethods :: Integer (51097.0) -
Alias of JSON::Generator::GeneratorMethods::Integer
Alias of JSON::Generator::GeneratorMethods::Integer -
JSON
:: Generator :: GeneratorMethods :: Integer (51097.0) -
Integer に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
Integer に JSON で使用するインスタンスメソッドを追加するためのモジュールです。 -
JSON
:: State # max _ nesting -> Integer (33622.0) -
生成される JSON 形式の文字列のネストの深さの最大値を返します。
生成される JSON 形式の文字列のネストの深さの最大値を返します。
この値がゼロである場合は、ネストの深さのチェックを行いません。
//emlist[例 ネストの深さチェックを行う][ruby]{
require "json"
json_state = JSON::State.new(max_nesting: 2)
json_state.max_nesting # => 2
JSON.generate([[]], json_state)
JSON.generate([[[]]], json_state) # => JSON::NestingError
//}
... -
JSON
:: State # buffer _ initial _ length -> Integer (33352.0) -
This integer returns the current initial length of the buffer.
This integer returns the current initial length of the buffer. -
JSON
:: State # depth -> Integer (33352.0) -
This integer returns the current depth of data structure nesting.
This integer returns the current depth of data structure nesting. -
JSON
:: State # depth=(depth) (33097.0) -
This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.
This sets the maximum level of data structure nesting in the generated
JSON to the integer depth, max_nesting = 0 if no maximum should be
checked. -
NEWS for Ruby 2
. 5 . 0 (217.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...はext/openssl/History.mdの"Version 2.1.0"セクションにあります。
* pathname
* Pathname#glob を追加 7360
* psych
* Psych 3.0.2 に更新しました
* Convert fallback option to a keyword argument
https://github.com/ruby/psych/pull/342
* Add :symbolize... -
NEWS for Ruby 2
. 7 . 0 (163.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...に注意してください。
* パターンマッチに対する警告は「-W:no-experimental」オプションで抑制できます。
==== 3.0 に向けてのキーワード引数の仕様変更
* キーワード引数と位置引数の自動変換は自動変換が非推奨となりま......ンで止められます。
//emlist{
def foo
class << Object.new
yield #=> warning: `yield' in class syntax will not be supported from Ruby 3.0. 15575
end
end
foo { p :ok }
//}
* 引数を転送する記法「(...)」が導入されました。 16253
* foo の全ての引数(キー......//emlist[][ruby]{
def foo(...)
bar(...)
end
//}
* 「$SAFE」の参照や代入は警告が表示されるようになりました。
Ruby 3.0 で「$SAFE」は普通のグローバル変数になる予定です。 16131
* Object#taint,Object#untaint,Object#trust,Object#untrustと関連... -
NEWS for Ruby 3
. 0 . 0 (109.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......eywords.
16166
//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]
pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//eml......7260
* `in` is changed to return `true` or `false`. 17371
//emlist{
0 => a
p a #=> 0
{b: 0, c: 1} => {b:}
p b #=> 0
//}
//emlist{
# version 3.0
0 in 1 #=> false
# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}
* Find-pattern is added. [EXPERIMENTAL]
16828
//emlist{
case [...