153件ヒット
[1-100件を表示]
(0.033秒)
種類
- インスタンスメソッド (57)
- 文書 (48)
- モジュール関数 (36)
- ライブラリ (12)
ライブラリ
- ビルトイン (69)
-
win32
/ registry (24)
モジュール
- FileTest (12)
-
Win32
:: Registry :: API (24)
キーワード
- DeleteKey (12)
- DeleteValue (12)
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) - length (12)
-
net
/ pop (12) - pack (21)
- pack テンプレート文字列 (12)
-
ruby 1
. 6 feature (12) - size? (12)
- unpack (12)
検索結果
先頭5件
-
Hash
# size -> Integer (15119.0) -
ハッシュの要素の数を返します。
...ハッシュの要素の数を返します。
//emlist[][ruby]{
h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
h.length #=> 4
h.size #=> 4
h.delete("a") #=> 200
h.length #=> 3
h.size #=> 3
//}... -
FileTest
. # size?(file) -> Integer | nil (6125.0) -
ファイルのサイズを返します。ファイルが存在しない時や ファイルのサイズが0の時には nil を返します。
...定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "test")
FileTest.size?("testfile") # => 4
File.delete("testfile")
FileTest.size?("testfile") # => nil
//}
@see FileTest.#size, FileTest.#zero?... -
Win32
:: Registry :: API . # DeleteKey(hkey , name) (3101.0) -
@todo
@todo -
Win32
:: Registry :: API . # DeleteValue(hkey , name) (3101.0) -
@todo
@todo -
net
/ pop (72.0) -
このライブラリは、POP3 (Post Office Protocol version 3) を 用いてPOPサーバからメールを受信する機能を提供するライブラリです。
...# 各メッセージにアクセスする
File.open("inbox/#{idx + 1}", 'w') {|f|
f.write m.pop
}
m.delete
end
$stderr.puts "#{pop.mails.size} mails popped."
end
pop.finish # セッションを終了する
POP サーバは......idx + 1}", 'w') {|f|
f.write m.pop
}
m.delete
end
$stderr.puts "#{pop.mails.size} mails popped."
end
}
Net::POP3#delete_all を使うと
さらに Net::POP3#each_mail と
Net::POPMail#delete を併合できます。
require 'net/pop'
Net::POP3.sta......= 0
pop.delete_all do |m|
File.open("inbox/#{i}", 'w') {|f|
f.write m.pop
}
i += 1
end
end
}
クラスメソッドの Net::POP3.delete_all を使うとさらに短くなります。
require 'net/pop'
i = 0
Net::POP3.delete_all('pop.exam... -
NEWS for Ruby 2
. 5 . 0 (30.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* String#start_with? は正規表現を受け取れるようになりました 13712
* String#delete_prefix, String#delete_prefix! を追加 12694
* String#delete_suffix, String#delete_suffix! を追加 13665
* String#each_grapheme_cluster, String#grapheme_clusters を追加。結......ithub.com/ruby/psych/pull/312
* rbconfig
* RbConfig::LIMITS is added to provide the limits of C types.
This is available when rbconfig/sizeof is loaded.
* ripper
* Ripper::EXPR_BEG and so on for Ripper#state.
* Ripper#state を追加。スキャナーの状態を伝えるた......* Set#reset 6589
* stringio
* StringIO#write は複数の引数を受け取れるようになりました
* strscan
* StringScanner#size, StringScanner#captures, StringScanner#values_at を追加 836
* uri
* Relative path operations no longer collapse consecutive slashes to a... -
ruby 1
. 6 feature (30.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...<ruby-core:00019>))
: 2002-09-11: Queue#((<Queue/pop>))
Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))
: 2002-09-11: SizedQueue.new
引数に 0 以下を受けつけるバグが修正されました。
: 2002-09-05: ((<リテラル/式展開>))
stable snapshot......i586-linux]
: SizedQueue#deq, #shift
: SizedQueue#enq
追加(push, pop の別名)。これらが定義されていなかったため、enq などを
呼び出したときスーパークラス Queue の enq が実行されていました。
: 2002-09-11: ((<tempfile/Tempfile#size>))
追加......Abortしていました。((<ruby-dev:13432>))
h = { 10 => 100, 20 => 200 }
h2 = { }
h.each { |k, v|
if (k == 10)
h.delete(10)
h2.replace(h) # => Abort core dumped
end
}
: $SAFE / ((<File>)).unlink
File.unlink は引数が汚染されてなくて... -
NEWS for Ruby 3
. 0 . 0 (24.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#push and related methods may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Ractor......* String#*
* String#capitalize
* String#center
* String#chomp
* String#chop
* String#delete
* String#delete_prefix
* String#delete_suffix
* String#downcase
* String#dump
* String#each_char
* String#each_grapheme_cluster
*......* Microarchitectural optimizations
* Native functions shared by multiple methods are deduplicated on JIT compaction.
* Decrease code size of hot paths by some optimizations and partitioning cold paths.
* Instance variables
* Eliminate some redundant checks.
* Skip... -
Hash
# length -> Integer (19.0) -
ハッシュの要素の数を返します。
...ハッシュの要素の数を返します。
//emlist[][ruby]{
h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
h.length #=> 4
h.size #=> 4
h.delete("a") #=> 200
h.length #=> 3
h.size #=> 3
//}... -
Array
# pack(template) -> String (12.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...0\x00by".unpack('ccxxcc') # => [82, 117, 98, 121]
//}
: Hexダンプを数値の配列に変換する例
//emlist[][ruby]{
"61 62 63 64 65 66".delete(' ').lines.pack('H*').unpack('C*')
# => [97, 98, 99, 100, 101, 102]
"61 62 63 64 65 66".split.collect {|c| c.hex}
# => [97, 98, 99, 100, 101, 102......'socket'
official_hostname, alias_hostnames, address_family, *address_list = Socket.gethostbyname("localhost")
address_list.find {|address| address.size == 4 }.unpack("C4").join(".")
# => "127.0.0.1"
"127.0.0.1".split(".").collect {|c| c.to_i}.pack("C4")
# => "\x7F\x00\x00\x01"
//}
: sockaddr_in...