69件ヒット
[1-69件を表示]
(0.085秒)
ライブラリ
- ビルトイン (33)
クラス
- File (22)
モジュール
- FileTest (11)
キーワード
-
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 3
. 0 . 0 (4) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) - size? (11)
- unlink (11)
検索結果
先頭5件
-
File
. delete(*filename) -> Integer (18167.0) -
ファイルを削除します。削除したファイルの数を返します。 削除に失敗した場合は例外 Errno::EXXX が発生します。
...。
//emlist[例][ruby]{
IO.write("test.txt", "test")
p File.exist?("test.txt") # => true
p File.delete("test.txt") # => 1
p File.exist?("test.txt") # => false
begin
File.delete("test.txt")
rescue
p $! # => #<Errno::ENOENT: No such file or directory @ unlink_internal - test.txt>
end
//}... -
File
. unlink(*filename) -> Integer (3067.0) -
ファイルを削除します。削除したファイルの数を返します。 削除に失敗した場合は例外 Errno::EXXX が発生します。
...。
//emlist[例][ruby]{
IO.write("test.txt", "test")
p File.exist?("test.txt") # => true
p File.delete("test.txt") # => 1
p File.exist?("test.txt") # => false
begin
File.delete("test.txt")
rescue
p $! # => #<Errno::ENOENT: No such file or directory @ unlink_internal - test.txt>
end
//}... -
FileTest
. # size?(file) -> Integer | nil (3036.0) -
ファイルのサイズを返します。ファイルが存在しない時や ファイルのサイズが0の時には nil を返します。
... IO オブジェクトを指定します。
@raise IOError 指定された 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?... -
ruby 1
. 8 . 3 feature (216.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...]
: FileUtils.chown_R [lib] [new]
: FileUtils.commands [lib] [new]
: FileUtils.options [lib] [new]
: FileUtils.have_option? [lib] [new]
: FileUtils.options_of [lib] [new]
: FileUtils.collect_method [lib] [new]
追加。
: FileUtils.rm_r [l......ます。
: net/http [lib] [new]
WebDAV のメソッドをサポートするようになりました。
PROPPATCH, LOCK, UNLOCK, OPTIONS, PROPFIND, DELETE, MOVE, COPY, MKCOL。
: Net::HTTPRequest#body_exist? [lib] [obsolete]
: Net::HTTPResponse#response [lib] [obsolete]
: Net::HTTPRespo......cat test_dlg.rb
foo = Object.new
foo2 = SimpleDelegator.new(foo)
def foo.bar
puts "bar"
end
foo2.bar
$ ruby-1.8.2 -r delegate test_dlg.rb
test_dlg.rb:6: undefined method `bar' for #<Object:0x4021b0a0> (NoMethodError)
$ ruby-1.8.3 -r delegate test_dl... -
ruby 1
. 6 feature (132.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。
((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。
== 1.6.8 (2002-12-24) ->......=> ruby 1.6.7 (2002-07-30) [i586-linux]
: 2002-05-20 IO#close
双方向のパイプの dup を close_write するとエラーになっていました。
((<ruby-dev:17155>))
open("|-","r+") {|f|
if f
f.dup.close_write
else
sleep 1
end
}
=> ru......: 2002-03-08 class variable
((<ruby-talk:35122>))
class C
class << self
def test
@@cv = 5
p @@cv
end
end
test
end
=> -:5:in `test': uninitialized class variable @@cv in C (NameError)
from -:9
ruby 1.6.7 (2002... -
NEWS for Ruby 3
. 0 . 0 (114.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ated 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 matches the behavior of Procs......GC.auto_compact have been added to control when compaction runs. Setting `auto_compact=` to `true` will cause compaction to occur during major collections. At the moment, compaction adds significant overhead to major collections, so please test first! 17176
* Hash
* Hash#transform_keys and......their values. 15822
* IO
* IO#nonblock? now defaults to `true`. 16786
* IO#wait_readable, IO#wait_writable, IO#read, IO#write and other related methods (e.g. IO#puts, IO#gets) may invoke the scheduler hook `#io_wait(io, events, timeout)` in a non-blocking execution context. 16786
* Ker... -
NEWS for Ruby 2
. 2 . 0 (84.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...atest_gc_info は現在のGCのステータスを再現するために :state を返すようになりました。
* 改善: メジャーGCにインクリメンタルマーキングを導入しました。 10137
* IO
* 改善: Windows上でパイプのための IO#read_nonblock, IO#write_......るポリシーを変更しました 10315
{ **hash1, **hash2 } は重複するキーについては hash2 の値を持ちます
* IO
* 非互換: IO#flush を使ったとき、ファイルのメタデータが即時更新されることを仮定できなくなりました。
い......い内部的なイベントをサポートしました。r47528
* RUBY_INTERNAL_EVENT_GC_ENTER
* RUBY_INTERNAL_EVENT_GC_EXIT
* rb_hash_delete() は与えられたブロックを評価しなくなりました。
* rb_extract_keywords() と rb_get_kwargs() はエクスポートされま...