るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils cp_r
  5. bigdecimal to_r

ライブラリ

クラス

キーワード

検索結果

StringScanner#clear -> self (24214.0)

スキャンポインタを文字列末尾後まで進め、マッチ記録を捨てます。

...を捨てます。

@
return self を返します。

pos = self.string.size と同じ動作です。

//emlist[例][ruby]{
r
equire 'strscan'

s = StringScanner.new('test string')
s.scan(/\w+/) # => "test"
s.matched # => "test"
s.pos # => 4
s[0] # => "test"
s.terminate
s.matched...
...# => nil
s[0] # => nil
s.pos # => 11
//}

StringScanner#clear は将来のバージョンで削除される予定です。
代わりに StringScanner#terminate を使ってください。...

OpenSSL::BN#clear_bit!(n) -> self (12226.0)

自身の n ビット目を0にします。

...自身の n ビット目を0にします。

//emlist[][ruby]{
r
equire 'openssl'

a = OpenSSL::BN.new("129")
a.clear_bit!(0)
a # => 128
//}

@
param n 0にするビットの位置
@
raise OpenSSL::BNError 計算時エラー
@
see OpenSSL::set_bit!...

StringScanner#terminate -> self (9114.0)

スキャンポインタを文字列末尾後まで進め、マッチ記録を捨てます。

...を捨てます。

@
return self を返します。

pos = self.string.size と同じ動作です。

//emlist[例][ruby]{
r
equire 'strscan'

s = StringScanner.new('test string')
s.scan(/\w+/) # => "test"
s.matched # => "test"
s.pos # => 4
s[0] # => "test"
s.terminate
s.matched...
...# => nil
s[0] # => nil
s.pos # => 11
//}

StringScanner#clear は将来のバージョンで削除される予定です。
代わりに StringScanner#terminate を使ってください。...

SDBM#update(other) -> self (119.0)

self と other の内容をマージします。

...と other の内容をマージします。

重複するキーに対応する値はother の内容で上書きされます。

@
param other each_pair メソッドを持つオブジェクトでなければなりません。

r
equire 'sdbm'

db1 = SDBM.open('aaa.gdbm', 0666)
db1.clear
db1['...
...a'] = 'aaa'
db1['b'] = 'bbb'
db1['c'] = 'ccc'
db2 = SDBM.open('bbb.gdbm', 0666)
db2.clear
db2['c'] = 'ccc'
db2['d'] = 'ddd'
hash = { 'x' => 'xxx', 'y' => 'yyy'}

p db1 #=> #<SDBM:0xb7d19554>
p db1.to_hash #=> {"a"=>"aaa", "b"=>"bbb", "c"=>"ccc"}
p db1.update...