458件ヒット
[1-100件を表示]
(0.091秒)
種類
- インスタンスメソッド (280)
- 特異メソッド (84)
- モジュール関数 (45)
- 文書 (37)
- オブジェクト (12)
ライブラリ
クラス
- DBM (12)
-
Encoding
:: Converter (60) - GDBM (12)
- Hash (52)
- IO (48)
- Method (12)
- Pathname (12)
-
REXML
:: Child (12) -
REXML
:: Parent (12) - SDBM (12)
- String (96)
- UnboundMethod (12)
-
YAML
:: DBM (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - ARGF (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) - arity (24)
- encode (36)
-
for
_ fd (12) - gsub (24)
- gsub! (12)
- merge (24)
- merge! (14)
- new (48)
- open (24)
-
replace
_ child (12) -
replace
_ with (12) - replacement (12)
- replacement= (12)
-
ruby 1
. 6 feature (12) - sub (36)
- sub! (12)
- timeout (21)
- tr (12)
- update (14)
検索結果
先頭5件
-
YAML
:: DBM # replace(other) -> YAML :: DBM (21201.0) -
self の内容を other の内容で置き換えます。
...self の内容を other の内容で置き換えます。
@param other Hash、DBM オブジェクトを指定します。
@raise DBMError 更新に失敗した場合に発生します。
自身を返します。... -
SDBM
# replace(other) -> self (21143.0) -
self の内容を other の内容で置き換えます。
...。
require 'sdbm'
db1 = SDBM.open('aaa.gdbm', 0666)
db1['a'] = 'aaa'
db1['b'] = 'bbb'
db1['c'] = 'ccc'
db2 = SDBM.open('bbb.gdbm', 0666)
db2['c'] = 'ccc'
db2['d'] = 'ddd'
hash = { 'x' => 'xxx', 'y' => 'yyy'}
p db1 #=> #<SDBM:0xb7c304d0>
p db1.to_hash......#=> {"a"=>"aaa", "b"=>"bbb", "c"=>"ccc"}
p db1.replace(db2) #=> #<SDBM:0xb7c304d0>
p db1.to_hash #=> {"c"=>"ccc", "d"=>"ddd"}
p db1.replace(hash) #=> #<SDBM:0xb7c304d0>
p db1.to_hash #=> {"x"=>"xxx", "y"=>"yyy"}... -
GDBM
# replace(other) -> self (21137.0) -
self の内容を other の内容で置き換えます。
...gdbm'
db1 = GDBM.open('aaa.gdbm', 0666, GDBM::NEWDB)
db1['a'] = 'aaa'
db1['b'] = 'bbb'
db2 = GDBM.open('bbb.gdbm', 0666, GDBM::NEWDB)
db2['c'] = 'ccc'
db2['d'] = 'ddd'
hash = { 'x' => 'xxx', 'y' => 'yyy'}
p db1 #=> #<GDBM:0xb7d1c8a8>
p db1.replace(db2) #=> #<GD......BM:0xb7d1c8a8>
p db1.replace(hash) #=> #<GDBM:0xb7d1c8a8>... -
DBM
# replace(other) -> self (21113.0) -
self の内容を other の内容で置き換えます。
...。
require 'dbm'
db1 = DBM.open('aaa.db', 0666, DBM::NEWDB)
db1[:a] = 'aaa'
db1[:b] = 'bbbbbb'
db2 = DBM.open('bbb.db', 0666, DBM::NEWDB)
db2[:bb] = 'bbb'
db2[:cc] = 'ccc'
p db1.keys #=> ['b', 'a']
db1.replace(db2)
p db1.keys #=> ['bb', 'cc']
p db2.keys #=> ['bb',......'cc']
hash = {'x' => 'xxx', 'y' => 'yyy' }
p db1 #=> #<DBM:0xb7c7eb08>
p db1.replace(hash) #=> #<DBM:0xb7c7eb08>... -
REXML
:: Parent # replace _ child(to _ replace , replacement) -> () (12430.0) -
子ノード列上の to_replace を replacement に置き換えます。
...子ノード列上の to_replace を replacement に置き換えます。
to_replace の parent は nil に、
replacement の parent は selfに変更されます。
@param to_replace 置き換え元のノード
@param replacement 置き換え先のノード... -
REXML
:: Child # replace _ with(child) -> self (9207.0) -
親ノードの子ノード列上において、 self を child に置き換えます。
...親ノードの子ノード列上において、 self を child に置き換えます。
@param child 置き換え後のノード
@see REXML::Parent#replace_child... -
Encoding
:: Converter # replacement=(string) (9106.0) -
置換文字を設定します。
...置換文字を設定します。
@param string 変換器に設定する置換文字
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace)
ec.replacement = "<undef>"
p ec.convert("a \u3042 b") #=> "a <undef> b"
//}... -
Encoding
:: Converter # replacement -> String (9100.0) -
変換器に設定されている置換文字を返します。
...器に設定されている置換文字を返します。
@return 変換器に設定されている置換文字
//emlist[][ruby]{
ec = Encoding::Converter.new("euc-jp", "us-ascii")
p ec.replacement #=> "?"
ec = Encoding::Converter.new("euc-jp", "utf-8")
p ec.replacement #=> "\uFFFD"
//}... -
String
# encode(**options) -> String (6162.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
@param encoding 変換先のエン......コーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param option 変換オプションをキーワード引数で与えます......れた文字列
変換オプション
: :invalid => nil
変換元のエンコーディングにおいて不正なバイトがあった場合に、例外 Encoding::InvalidByteSequenceError を投げます。(デフォルト)
: :invalid => :replace
変換元のエンコーディングにおい...