24件ヒット
[1-24件を表示]
(0.073秒)
ライブラリ
- ビルトイン (12)
-
irb
/ context (12)
クラス
-
IRB
:: Context (12) - String (12)
検索結果
-
String
# inspect -> String (18126.0) -
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。 変換された文字列は印字可能な文字のみによって構成されます
...ために用意されています。
永続化などの目的で文字列をダンプしたいときは、
String#dump を使うべきです。
//emlist[例][ruby]{
# p ではないことに注意
puts "string".inspect # => "string"
puts "\t\r\n".inspect # => "\t\r\n"
//}
@see String#dump... -
IRB
:: Context # inspect _ mode=(opt) (6138.0) -
実行結果の出力方式を opt に設定します。
...false, :to_s, :raw
出力結果を to_s したものを表示します。
: true, :p, :inspect
出力結果を inspect したものを表示します。
: :pp, :pretty_inspect
出力結果を pretty_inspect したものを表示します。
: :yaml, :YAML
出力結果を YAML 形式にした......ものを表示します。
: :marshal, :Marshal, :MARSHAL, Marshal
出力結果を Marshal.#dump したものを表示します。
@see lib:irb#inspect_mode...