種類
- インスタンスメソッド (52)
- 文書 (29)
- 特異メソッド (24)
- ライブラリ (24)
- クラス (8)
クラス
- Hash (24)
-
Net
:: FTP (20) -
Net
:: FTP :: MLSxEntry (20)
モジュール
-
Rake
:: Cloneable (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - FrozenError (8)
-
NEWS for Ruby 3
. 0 . 0 (5) - dup (12)
- facts (10)
- mlsd (20)
- new (24)
-
rdoc
/ generator / json _ index (12) -
rdoc
/ markdown (12) -
ruby 1
. 6 feature (12)
検索結果
先頭5件
-
NEWS for Ruby 3
. 0 . 0 (26006.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......ord arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matche......a closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_... -
ruby 1
. 6 feature (23084.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...uby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。
((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。
== 1.6.8 (2002-12-24) -> stable-snapshot
:......rno
EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ
ていました。現在は、このようなシステムでは、EWOULDBLOCK は、EAGAIN
として定義されています。(これは 1.6.7 とは異なる挙動です)
p Errno::EAGAIN......ase!
p a
=> ruby 1.6.7 (2002-03-01) [i586-linux]
"KEY"
=> -:3:in `upcase!': can't modify frozen string (TypeError)
from -:3
ruby 1.6.7 (2002-08-01) [i586-linux]
: 2002-06-10 Fixnum#>>, <<
負の数に対して右シフトすると 0... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (23078.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への変更点(まとめ)/サポートプラットフォームの追加>))
...の変更点(まとめ)/正規表現>))
* ((<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への変更点(ま......t>)) [change]
: ((<組み込み変数/$stderr>)) [change]
: ((<組み込み変数/$stdin>)) [change]
$stdout, $stderr は、$defout, $deferr の別名になり
$defout, $deferr は ((<obsolete>)) になりました
$stdin は、普通のグローバル変数となりました(STDINをリダ......i586-linux]
"value"
この例のように sub! のような破壊的メソッドの効果がないため混乱すると
いうのが理由です(ENVが返す文字列を変更しても環境変数自体に影響がない)。
=> -:2:in `sub!': can't modify frozen string (Type... -
Net
:: FTP :: MLSxEntry # modify -> Time|nil (21201.0) -
エントリの変更時刻を返します。
...エントリの変更時刻を返します。
情報がない場合は nil を返しますが、通常は
あるはずです。... -
Hash
. new(ifnone = nil) -> Hash (6206.0) -
空の新しいハッシュを生成します。ifnone はキーに対 応する値が存在しない時のデフォルト値です。設定したデフォルト値はHash#defaultで参照できます。
...す。ifnone はキーに対
応する値が存在しない時のデフォルト値です。設定したデフォルト値はHash#defaultで参照できます。
ifnoneを省略した Hash.new は {} と同じです。
デフォルト値として、毎回同一のオブジェクトifnoneを返し......new([])
h[0] << 0
h[1] << 1
p h.default #=> [0, 1]
//}
これを避けるには、破壊的でないメソッドで再代入する必要が有ります。
また、このようなミスを防ぐためにもifnoneは freeze して破壊的操作を禁止しておくのが無難です。
@param ifn......#=> ["bar"]
p h[1] #=> ["bar"]
p h[2] #=> ["bar"]
p h[2].object_id #=> 6127150
p h #=> {}
h = Hash.new([].freeze)
h[0] += [0] #破壊的でないメソッドはOK
h[1] << 1
# エラー: can't modify frozen Array (RuntimeError)
//}......#=> ["bar"]
p h[1] #=> ["bar"]
p h[2] #=> ["bar"]
p h[2].object_id #=> 6127150
p h #=> {}
h = Hash.new([].freeze)
h[0] += [0] #破壊的でないメソッドはOK
h[1] << 1
# エラー: can't modify frozen Array (FrozenError)
//}... -
Hash
. new {|hash , key| . . . } -> Hash (6101.0) -
空の新しいハッシュを生成します。ブロックの評価結果がデフォルト値になりま す。設定したデフォルト値はHash#default_procで参照できます。
...ArgumentError ブロックと通常引数を同時に与えると発生します。
//emlist[例][ruby]{
# ブロックではないデフォルト値は全部同一のオブジェクトなので、
# 破壊的変更によって他のキーに対応する値も変更されます。
h = Hash.new("fo......値がまだ無いキーが呼び出される度に
# ブロックを評価するので、全て別のオブジェクトになります。
h = Hash.new {|hash, key| hash[key] = "foo"}
p h[1] #=> "foo"
p h[1].object_id #=> 6126900
p h[1] << "bar" #=> "foobar"
p h[1]......定されていないときに(fetchのように)例外をあげるようにもできる
h = Hash.new {|hash, key|
raise(IndexError, "hash[#{key}] has no value")
}
h[1]
# エラー hash[1] has no value (IndexError)
//}
@see Hash#default=,Hash#default,Hash#default_proc... -
FrozenError (6006.0)
-
Object#freezeされたオブジェクトを変更しようとした時に発生します。
...Object#freezeされたオブジェクトを変更しようとした時に発生します。
//emlist[例][ruby]{
[1, 2, 3].freeze << 4 # FrozenError: can't modify frozen Array
//}... -
rdoc
/ generator / json _ index (6006.0) -
他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。
...ータが生成する HTML で検索が行えるように、JSON の検索インデッ
クスを生成するサブライブラリです。
This generator is derived from sdoc by Vladimir Kolesnikov and
contains verbatim code written by him.
このジェネレータは HTML ジェネレータと一......ます。:
class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir = Pathname.pwd.expand_path
@json_index = RDoc::Generator::JsonIndex.new self, options
end
def generate
# ...
@json_index.generate
end
end
=== インデックスフ......09 Vladimir Kolesnikov
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish... -
rdoc
/ markdown (6006.0) -
Markdown 形式で記述されたドキュメントを rdoc 上で解析するための サブライブラリです。
...Markdown 形式で記述されたドキュメントを rdoc 上で解析するための
サブライブラリです。
詳しくは以下を参照してください。
* https://daringfireball.net/projects/markdown/syntax
Markdown 形式をデフォルトのフォーマットにする場合は......、
lib:rdoc#saved_options を参考に プロジェクトのデフォルトを
.rdoc_options ファイルで設定してください。
=== 拡張
以降の Markdown の拡張は RDoc のパーサ独自にサポートされているも
のです。ただし、全てがデフォルトで有効に......ssion is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/o... -
Net
:: FTP :: MLSxEntry # facts -> { String => String|Integer|Time } (3212.0) -
そのエントリの「facts」を返します。
...そのエントリの「facts」を返します。
facts とはそのエントリに関するファイルサイズなどの様々な情報です。
Net::FTP はこの情報を文字列をキーとするハッシュテーブルで
返します。
標準では以下のような facts が定義され......りません。
3659 では
modify, perm, type, size, unique はすべてのサーバで
対応すべき(SHOULD)、とされています。
* "modify" : 変更時刻 (Time)
* "create": 作成時刻
* "perm": パーミッション(String)
* "type": 種類(String, "file", "dir", "cdir", "pdi......)
* "size": ファイルサイズ (Integer, octet単位)
* "unique": ユニークID (String)
* "lang": ファイルの言語 (String)
* "media-type": メディアタイプ (String)
* "charset": 文字エンコーディング (String)
サーバが UNIX 系 OS の場合は以下のよう...