るりまサーチ

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

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. module >
  4. integer >
  5. float >

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

IO#eof -> bool (18256.0)

ストリームがファイルの終端に達した場合、true を返します。そうでない場合、false を返します。

...f = File.new("testfile")
dummy = f.readlines
f.eof #=> true

自身がパイプやソケットなどのストリームであった場合、相手がデータを送るか close するまでブロックします。

r, w = IO.pipe
Thread.new { sleep 10; w.close }
r.eof? #=> 10秒ブ...
...ックしてから true を返す。

r, w = IO.pipe
Thread.new { sleep 10; w.puts "a" }
r.eof? #=> 10秒ブロックしてから false を返す。

r, w = IO.pipe
r.eof? # 永久にブロックします。

eof
, eof? は入力バッファにデータを読み込むので、IO#sysr...

Gem::Package::TarReader.new(io) -> Gem::Package::TarReader (18207.0)

io に関連付けて Gem::Package::TarReader を初期化します。

...io に関連付けて Gem::Package::TarReader を初期化します。

@param io pos, eof?, read, getc, pos= というインスタンスメソッドを持つ
オブジェクトを指定します。...

IO#eof? -> bool (6256.0)

ストリームがファイルの終端に達した場合、true を返します。そうでない場合、false を返します。

...f = File.new("testfile")
dummy = f.readlines
f.eof #=> true

自身がパイプやソケットなどのストリームであった場合、相手がデータを送るか close するまでブロックします。

r, w = IO.pipe
Thread.new { sleep 10; w.close }
r.eof? #=> 10秒ブ...
...ックしてから true を返す。

r, w = IO.pipe
Thread.new { sleep 10; w.puts "a" }
r.eof? #=> 10秒ブロックしてから false を返す。

r, w = IO.pipe
r.eof? # 永久にブロックします。

eof
, eof? は入力バッファにデータを読み込むので、IO#sysr...

ruby 1.8.4 feature (3600.0)

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

...ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* on...
...e/Ruby本体>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/super [bug]>))
* ((<ruby 1.8.4 feature/正規表現 [bug]>))
* ((<ruby 1.8.4 feature/シグナル [bug]>))
* ((<ruby 1.8.4 feature/組み込みライブラリ>))
* ((<r...
...(ArgumentError)

: Hash [bug]

#Wed Nov 23 03:40:49 2005 Guy Decoux <ts@moulon.inra.fr>
#
# * re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
# [ruby-core:06721]

sizeof(long) > sizeof(int) な環境で、ハッシュ関数のオーバー
フローのためにString...

irb (480.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...0>

あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。

irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def foo
irb(main):004:2> print 1
irb(main):005:2> end
irb(main):006:1> end
:foo
irb(main):007:0>...
..._LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:MATH_...
...irb#2(Foo):005:0> def bar # Foo#barを定義
irb#2(Foo):006:1> print "bar"
irb#2(Foo):007:1> end
nil
irb#2(Foo):010:0> Foo.instance_methods
["bar", "foo"]
irb#2(Foo):011:0> fg 0
nil
irb(main):007:0> f = Foo.new
#<Foo:0x4010af3c>
irb(main):008:0> irb f...
..._LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:PROMP...

絞り込み条件を変える

CSV.open(filename, mode = "rb", options = Hash.new) -> CSV (228.0)

このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。

...を IO や File に委譲します。

* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isat...
...lename ファイル名を指定します。

@param mode IO.open に指定できるものと同じものを指定できます。

@param options CSV.new のオプションと同じオプションを指定できます。

//emlist[例 読み取り・ブロック指定なし][ruby]{
require "csv"

Fil...
...iro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.open("test.csv", headers: true)
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}

//emlist[例 読み取り・ブロック指定あり][ruby]{
require "csv"

users =<<-EOS
id,firs...

CSV.open(filename, mode = "rb", options = Hash.new) {|csv| ... } -> nil (228.0)

このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。

...を IO や File に委譲します。

* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isat...
...lename ファイル名を指定します。

@param mode IO.open に指定できるものと同じものを指定できます。

@param options CSV.new のオプションと同じオプションを指定できます。

//emlist[例 読み取り・ブロック指定なし][ruby]{
require "csv"

Fil...
...iro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.open("test.csv", headers: true)
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}

//emlist[例 読み取り・ブロック指定あり][ruby]{
require "csv"

users =<<-EOS
id,firs...

CSV.open(filename, options = Hash.new) -> CSV (228.0)

このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。

...を IO や File に委譲します。

* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isat...
...lename ファイル名を指定します。

@param mode IO.open に指定できるものと同じものを指定できます。

@param options CSV.new のオプションと同じオプションを指定できます。

//emlist[例 読み取り・ブロック指定なし][ruby]{
require "csv"

Fil...
...iro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.open("test.csv", headers: true)
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}

//emlist[例 読み取り・ブロック指定あり][ruby]{
require "csv"

users =<<-EOS
id,firs...

CSV.open(filename, options = Hash.new) {|csv| ... } -> nil (228.0)

このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。

...を IO や File に委譲します。

* IO#binmode
* IO#binmode?
* IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isat...
...lename ファイル名を指定します。

@param mode IO.open に指定できるものと同じものを指定できます。

@param options CSV.new のオプションと同じオプションを指定できます。

//emlist[例 読み取り・ブロック指定なし][ruby]{
require "csv"

Fil...
...iro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.open("test.csv", headers: true)
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}

//emlist[例 読み取り・ブロック指定あり][ruby]{
require "csv"

users =<<-EOS
id,firs...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> Symbol (206.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

..._byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => tru...
...e # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequenc...
...defined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_er...

絞り込み条件を変える

<< 1 2 3 > >>