るりまサーチ

最速Rubyリファレンスマニュアル検索!
132件ヒット [1-100件を表示] (0.046秒)
トップページ > クエリ:io[x] > クエリ:each[x] > クエリ:test[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each_line
  4. io each
  5. io readlines

検索結果

<< 1 2 > >>

Kernel.#test(cmd, file1, file2) -> bool (18156.0)

2ファイル間のファイルテストを行います。

...とみなします。
@param file1 テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@param file2 テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@return 真偽値を返します。

以下は cmd...
...ファイル1とファイル2が同一のファイルである

//emlist[例][ruby]{
IO
.write("testfile1", "test1")
IO
.write("testfile2", "test2")
%w(= < > -).each do |e|
result = test(e, "testfile1", "testfile2")
puts "#{e}: #{result}"
end
//}

# => =: true
# => <: false
# => >: false
# =>...

Kernel.#test(cmd, file) -> bool | Time | Integer | nil (18146.0)

単体のファイルでファイルテストを行います。

...列の場合はその先頭の文字だけをコマンドとみなします。
@param file テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@return 下表に特に明記していないものは、真偽値を返します。

以下は cmd として...
...me
: ?A
ファイルの最終アクセス時刻を返す -> Time
: ?C
ファイルの inode 変更時刻を返す -> Time

//emlist[例][ruby]{
IO
.write("testfile", "test")
test
("r", "testfile") # => true
test
("s", "testfile") # => 4
test
("M", "testfile") # => 2018-03-31 07:38:40 +0900
//}...

ARGF.class#each_char -> Enumerator (6168.0)

レシーバに含まれる文字を一文字ずつブロックに渡して評価します。

...クトを生成し
て返します。

例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_char # => #<Enumerator: ARGF:each_char>
ARGF.each_char{|e|p e}

# => "l"
# "i"
# "n"
# "e"
#...
..."1"
# "\n"
# "l"
# "i"
# "n"
# "e"
# "2"
# "\n"

@see IO#each_char...

ARGF.class#each_char { |c| ... } -> self (6168.0)

レシーバに含まれる文字を一文字ずつブロックに渡して評価します。

...クトを生成し
て返します。

例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_char # => #<Enumerator: ARGF:each_char>
ARGF.each_char{|e|p e}

# => "l"
# "i"
# "n"
# "e"
#...
..."1"
# "\n"
# "l"
# "i"
# "n"
# "e"
# "2"
# "\n"

@see IO#each_char...

ruby 1.8.4 feature (282.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...ruby 1.8.4 feature/printf [bug]>))
* ((<ruby 1.8.4 feature/Hash [bug]>))
* ((<ruby 1.8.4 feature/test [bug]>))
* ((<ruby 1.8.4 feature/File.identical? [new]>))
* ((<ruby 1.8.4 feature/FileTest.identical? [new]>))
* ((<ruby 1.8.4 feature/File.split [change]>))
* ((<ruby 1.8.4 feature/File...
.../File.join [bug]>))
* ((<ruby 1.8.4 feature/Thread#pass [bug]>))
* ((<ruby 1.8.4 feature/Module#const_missing [bug]>))
* ((<ruby 1.8.4 feature/IO [bug]>))
* ((<ruby 1.8.4 feature/添付ライブラリ>))
* ((<ruby 1.8.4 feature/"Ruby/Tk">))
* ((<ruby 1.8.4 feature/REXML [compat]>))
* ((<...
...合にSEGVする可能性
があったバグの修正。((<ruby-dev:27331>))

: IO [bug]

#Wed Sep 28 08:12:18 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * io.c (read_buffered_data): check if reached EOF. fixed: [ruby-dev:27334]

Solaris(64bit?)などでEOF後にゴミを読み...

絞り込み条件を変える

1.6.8から1.8.0への変更点(まとめ) (264.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への変更点(まとめ)/サポートプラットフォームの追加>))

...任意
の値を返すことができます。

: 多重代入 [change]

多重代入の規則を見直しました。

# # derived from sample/test.rb
# a = *[]; p a # special case
# def f; yield; end; f {|a| p a} # add (warning)
# def r; return; end; a = r...
...クラ
スのインスタンスになりました。

=== クラス階層

: ((<File::Constants>))

File::Constants は、File クラスでなく IO クラスが include するように
なりました。((<ruby-dev:20964>))

: ((<UnboundMethod>)) [compat]

UnboundMethod クラスは Method...
...た。

: ((<String#insert|String/insert>)) [new]

追加

(({str[n, 0] = other})) と同じ(ただし self を返す)

=== Struct

: ((<Struct/each_pair>)) [new]

追加。

=== Symbol

: ((<Symbol/Symbol.all_symbols>)) [new]
追加 ((<ruby-dev:12921>))

=== SystemCallError

: ((<Syste...

ruby 1.8.3 feature (252.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...
...b] [new]

追加。

: Net::HTTPHeader#each_capitalized [lib] [compat]
: Net::HTTPHeader#each_capitalized_name [lib] [new]

Net::HTTPHeader#canonical_each は Net::HTTPHeader#each_capitalized
に名前が変わりました。canonical_each each_capitalized の別名とし
て提供...
...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...

NEWS for Ruby 3.1.0 (180.0)

NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...17411

//emlist{
Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a
#=> [[3, 5], [5, 7], [11, 13]]
//}

* ピン演算子がインスタンス変数、クラス変数、グローバル変数をサポートしました。 17724

//emlist{
@n = 5
Prime.each_cons(2).lazy.find{_1 in [...
...rependしている場合、継承ツリーを変更しません。 17423
* Module#private, Module#public, Module#protected, Module#module_functionが引数を返すようになりました。引数が1つでも渡されている場合、それが返されます。引数なしの場合、nilが...
...io 3.0.1
* strscan 3.0.1
* tempfile 0.1.2
* time 0.2.0
* timeout 0.2.0
* tmpdir 0.1.2
* un 0.2.0
* uri 0.11.0
* yaml 0.2.0
* zlib 2.1.1
* 以下のbundled gemsが更新されました。
* minitest 5.15.0
* power_assert 2.0.1
* rake 13.0.6
* test...

ruby 1.6 feature (144.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) ->...
...=> -:1: [BUG] Segmentation fault
ruby 1.6.7 (2002-03-01) [i586-linux]
=> ruby 1.6.7 (2002-03-15) [i586-linux]

: 2002-03-10 メソッドの戻り値

以下のメソッドの戻り値が正しくなりました。((<ruby-bugs-ja:PR#205>))

* ((<Enumerable/each_with_index>)) が self...
...: 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 (126.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...
...data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}

* Binding
* Binding#eval when called with one argument will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352 17419
* ConditionVariable
* ConditionVariable#wait may now inv...
...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...

絞り込み条件を変える

NEWS for Ruby 2.2.0 (90.0)

NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...C.latest_gc_info は現在のGCのステータスを再現するために :state を返すようになりました。
* 改善: メジャーGCにインクリメンタルマーキングを導入しました。 10137

* IO
* 改善: Windows上でパイプのための IO#read_nonblock, IO#wri...
...るポリシーを変更しました 10315
{ **hash1, **hash2 } は重複するキーについては hash2 の値を持ちます

* IO
* 非互換: IO#flush を使ったとき、ファイルのメタデータが即時更新されることを仮定できなくなりました。
...
...
http://docs.seattlerb.org/rubygems/History_txt.html#label-2.4.2+%2F+2014-10-01

* tsort
* TSort.tsort_each, TSort.each_strongly_connected_component,
TSort.each_strongly_connected_component_from はブロックを省略すると Enumerator を返すようになりました。...
<< 1 2 > >>