28件ヒット
[1-28件を表示]
(0.118秒)
種類
- 文書 (17)
- インスタンスメソッド (11)
ライブラリ
- pathname (11)
クラス
- Pathname (11)
キーワード
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 6 . 0 (6)
検索結果
-
Pathname
# binread(*args) -> String | nil (24357.0) -
IO.binread(self.to_s, *args)と同じです。
...IO.binread(self.to_s, *args)と同じです。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("testfile")
pathname.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname.binread(20) # => "This is line one\nThi"
pathname.binread(2......0, 10) # => "ne one\nThis is line "
//}
@see IO.binread... -
Marshal フォーマット (6216.0)
-
Marshal フォーマット フォーマットバージョン 4.8 を元に記述しています。
...Marshal フォーマット
フォーマットバージョン 4.8 を元に記述しています。
=== nil, true, false
それぞれ、'0', 'T', 'F' になります。
//emlist[][ruby]{
p Marshal.dump(nil).unpack1("x2 a*") # => "0"
p Marshal.dump(true).unpack1("x2 a*") # => "T"
p Marshal.dump......n + 5
-124 < n < 0: n - 5
//}
という数値(1 byte)を格納します。5 を足したり引いたりするのは下記の
形式 2 との区別のためです。
//emlist[例][ruby]{
p Marshal.dump(-1).unpack1("x2 a*") # => "i\xFA"
p Marshal.dump(0).unpack1("x2 a*") # => "i\x00"
p Marshal.du......_dump が返す値 |
//}
//emlist[][ruby]{
# coding: ascii-8bit
class Foo
def self._load
end
def _dump(obj)
"hogehoge"
end
end
p Marshal.dump(Foo.new).unpack("x2 a aca3 c a*")
# => ["u", ":", 8, "Foo", 13, "hogehoge"]
//}
=== 'U'
marshal_dump、marshal_load を定義していれば 'U... -
NEWS for Ruby 2
. 6 . 0 (3084.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.6.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......ルか bugs.ruby-lang.org の issue を参照してください。
== 2.5.0 以降の変更
=== 言語仕様の変更
* $SAFE はプロセスグローバルで扱われることになると共に、0以外を設定した後に0に戻せるようになりました。 14250
* Refinements が......* Hash#filter! が Hash#select! の別名として追加されました。 13784
* IO
* 新規オプション
* 排他的ファイルオープンを表すモード文字 'x' が追加されました。 11258
* Kernel
* 別名
* Object#then が Object#yield_self の別名...