るりまサーチ

最速Rubyリファレンスマニュアル検索!
99件ヒット [1-99件を表示] (0.035秒)

別のキーワード

  1. uri default_port
  2. _builtin default
  3. socket ai_default
  4. generic default_port
  5. socket ip_default_multicast_ttl

検索結果

Marshal.#dump(obj, limit = -1) -> String (18138.0)

obj を指定された出力先に再帰的に出力します。

...クを持った Hash は
Proc を間接的に指していることになります。

//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}

マーシャルの動作を任意に定義することもできます。

@param obj ダン...
...オブジェクトをダンプしようとした場合に発生します。

@raise ArgumentError limit 段以上深くリンクしたオブジェクトをダンプしようと
した場合に発生します。

@see Object#marshal_dump, Object#marshal_load...

Marshal.#dump(obj, port, limit = -1) -> IO (18138.0)

obj を指定された出力先に再帰的に出力します。

...クを持った Hash は
Proc を間接的に指していることになります。

//emlist[例][ruby]{
p Marshal.dump(Hash.new {})
# => -:1:in `dump': cannot dump hash with default proc (TypeError)
//}

マーシャルの動作を任意に定義することもできます。

@param obj ダン...
...オブジェクトをダンプしようとした場合に発生します。

@raise ArgumentError limit 段以上深くリンクしたオブジェクトをダンプしようと
した場合に発生します。

@see Object#marshal_dump, Object#marshal_load...

Marshal フォーマット (654.0)

Marshal フォーマット フォーマットバージョン 4.8 を元に記述しています。

...なります。

//emlist[][ruby]{
p Marshal.dump(nil).unpack1("x2 a*") # => "0"
p Marshal.dump(true).unpack1("x2 a*") # => "T"
p Marshal.dump(false).unpack1("x2 a*") # => "F"
//}

Ruby 2.1 以前では、インスタンス変数を設定しても dump されません。
Ruby 2.2 以降は freeze...
.../emlist[例][ruby]{
class Foo
end
p Marshal.dump(Foo.new).unpack("x2 a a c a*")
# => ["o", ":", 8, "Foo\x00"]
//}

=== 'u'

_dump、_load を定義していれば 'u' になります。
インスタンス変数は dump されなくなるので、_dump/_load で対応する必要があります。

/...
... dump | ... |
//}

//emlist[例][ruby]{
p Marshal.dump([true, false, nil]).unpack("x2 a c a a a")
# => ["[", 8, "T", "F", "0"]
//}

=== Hash

==== Hash without default value

'{' で始まるデータ構造になります。

//emlist{
| '{' | 要素数(Fixnum形式) | キーの dump | 値の dump |...

ruby 1.6 feature (156.0)

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

...合が修正されたのだそうです。
((<ruby-win32:273>))

: 2002-08-12 Hash#==

Hash オブジェクトはデフォルト値 (((<Hash/default>))) も == で等しい
ときに等しいとみなされるようになりました。

p Hash.new("foo") == Hash.new("bar")

=>...
...l
nil
nil
nil

: 2002-03-14 拡張ライブラリの autoload

拡張ライブラリに対して autoload が効いていませんでした。((<ruby-dev:16379>))

autoload :Fcntl, "fcntl"
require "fcntl"

=> -:2:in `require': uninitialized constant Fcn...
...6) [i586-linux]
5

: 2002-03-03 ((<Marshal/Marshal.load>))

Marshal.load が 1.7 のメソッド Proc#yield を呼んでいました。
((<ruby-dev:16178>))

Marshal.load(Marshal.dump('foo'), proc {|o| p o})
=> -:1:in `load': undefined method `yield' for #<Proc:0x401b1b30> (NameEr...

NEWS for Ruby 2.0.0 (120.0)

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

...します

* Hash
* 追加: Hash#to_h 明示的に変換するメソッドです。Array#to_a に似ています
* 拡張: Hash#default_proc= default proc をクリアするために nil を渡せるようになりました

* IO
* 非推奨: IO#lines, #bytes, #chars, #codepoints...
...非互換: Object#inspect は #to_s を呼び出さなくなりました。再定義された #to_s を呼び出すためです。

* LoadError
* 追加: LoadError#path ロードできなかったファイルのパスを返します

* Module
* 追加: Module#prepend 指定したモジ...
...HTML5 用のタグメーカーを呼び出すと CGI#header を header 要素を生成するために上書きします。

* csv
* CSV.dump と CSV.load を削除しました。ユーザーを危険なシリアライゼーションに関する脆弱性から保護するためです。

* ic...

絞り込み条件を変える

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

...merge は、hash.dup.update と同じ。
Hash#merge! は、Hash#update の別名 ((<ruby-talk:59777>)), ((<ruby-dev:19463>))

: ((<Hash#default_proc|Hash/default_proc>)) [new]

追加 ((<ruby-dev:17966>))

=== IO

: ((<IO/IO.sysopen>)) [new]
: ((<Socket#sysaccept|Socket/sysaccept>)) [new]
: ((<T...
...t_value>)) [new]
: ((<LocalJumpError#reason|LocalJumpError/reason>)) [new]

追加

=== Marshal

: ((<Marshal/Object#marshal_load>)) [new]
: ((<Marshal/Object#marshal_dump>)) [new]

追加 ((<ruby-dev:21016>))

=== MatchData

: ((<MatchData#captures|MatchData/captures>)) [new]

追加。((<R...
...=== Module

: ((<組み込み関数/autoload>)) [change]
: ((<組み込み関数/autoload?>)) [new]
: ((<Module#autoload|Module/autoload>)) [new]
: ((<Module#autoload?|Module/autoload>)) [new]

ネストしたクラス/モジュールに対する autoload 指定が可能になりました。...

NEWS for Ruby 3.0.0 (84.0)

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

...l:label-TypeProf] is experimentally bundled. It is a
type analysis tool for Ruby programs.
* Deprecation warnings are no longer shown by default (since Ruby 2.7.2).
Turn them on with `-W:deprecated` (or with `-w` to show other warnings too).
16345
* `$SAFE` and `$KCODE` are now n...
...ng#chomp
* String#chop
* String#delete
* String#delete_prefix
* String#delete_suffix
* String#downcase
* String#dump
* String#each_char
* String#each_grapheme_cluster
* String#each_line
* String#gsub
* String#ljust
* String#lstr...
...pes of classes and modules with advanced types including union types, overloading, generics, and _interface types_ for duck typing.
* Ruby ships with type definitions for core/stdlib classes.
* `rbs` gem is bundled to load and process RBS files.

=== TypeProf

* TypeProf is a type analysis too...

irb (54.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...ode
プロンプトモードを切り替える。現在定義されているプ
ロンプトモードは、default/simple/xmp/inf-ruby。
--inf-ruby-mode emacsのinf-ruby-mode 用のプロンプト表示を行なう。
特に指定が...
...[:IRB_RC] = nil
IRB.conf[:MATH_MODE] = false
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_MODE] = :DEFAULT
IRB.conf[:SINGLE_IRB] = false
IRB.conf[:SAVE_HISTORY] = nil
IRB.conf[:USE_LOADER] = true
IRB.conf[:USE_READLINE] = nil
IRB.conf[:USE_TRACER] = true
IRB.conf[:VERBOSE] = true...
...yaml, :YAML

出力結果を YAML 形式にしたものを表示します。

: :marshal, :Marshal, :MARSHAL, Marshal

出力結果を Marshal.#dump したものを表示します。

例:

$ irb
irb(main):001:0> conf.inspect_mode = :yaml
irb(main):002:0> :foo # => --- :foo

また、irb...
...f[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_MODE] = :DEFAULT
IRB.conf[:SINGLE_IRB] = false
IRB.conf[:SAVE_HISTORY] = nil
IRB.conf[:USE_LOADER] = true
IRB.conf[:USE_READLINE] = nil
IRB.conf[:USE_TRACER] = true
IRB.conf[:VERBOSE] = true...
...f[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_MODE] = :DEFAULT
IRB.conf[:SINGLE_IRB] = false
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:USE_LOADER] = true
IRB.conf[:USE_READLINE] = nil
IRB.conf[:USE_TRACER] = true
IRB.conf[:VERBOSE] = true...

ruby 1.8.4 feature (42.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...グの修正。((<ruby-core:06326>))

: Thread#pass [bug]

#Sun Oct 16 03:38:07 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (load_wait): need not to call rb_thread_schedule()
# explicitly. [ruby-core:04039]
#
# * eval.c (rb_thread_schedule): clear rb_thread_criti...
...command table and manipulate other IPs (for reason of security).
# Now, a IP object can be controlled by only its master IP or the
# default IP.
#
# * ext/tk/lib/remote-tk.rb: add restriction to manipulate.
#
# * ext/tk/tcltklib.c (ip_is_slave_of_p): add TclTkIp#slave_o...
...da::Tuple#initialize): check remote hash
# tuple. fixed: [ruby-list:41227]
#
# * test/rinda/test_rinda.rb: test it.

Hash全体がdumpできないオブジェクトとして扱われていました。
((<ruby-list:41227>))

: Iconv [compat]

#Sat Oct 8 20:04:40 2005 Nobuyoshi...

NEWS for Ruby 2.5.0 (24.0)

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

...5
* String#each_grapheme_cluster, String#grapheme_clusters を追加。結合文字を列挙します。
13780
* String#undump を追加。String#dumpで出力した文字列を元に戻します。12275

* Struct
* Struct.new は :keyword_init というキーワード引数を...
...* Convert fallback option to a keyword argument
https://github.com/ruby/psych/pull/342
* Add :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse
https://github.com/ruby/psych/pull/333, https://github.com/ruby/psych/pull/337
* Add Psych::Handler#event_lo...
...=== 標準添付ライブラリの互換性(機能追加とバグ修正を除く)

* Gemification
* 以下の標準添付ライブラリをdefault gemsに変更しました
* cmath
* csv
* date
* dbm
* etc
* fcntl
* fiddle
* fileutils
* g...

絞り込み条件を変える