るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.125秒)
トップページ > クエリ:i[x] > クエリ:end[x] > クエリ:open[x] > クエリ:pos=[x]

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. zlib end

ライブラリ

クラス

キーワード

検索結果

Dir#pos=(pos) (21124.0)

ディレクトリストリームの読み込み位置を pos に移動させます。 pos は Dir#tell で与えられた値でなければなりま せん。

...は Dir#tell で与えられた値でなければなりま
せん。

@param pos 変更したい位置を整数で与えます。

@raise IOError 既に自身が close している場合に発生します。

//emlist[例][ruby]{
Dir.open("testdir") do |d|
d.read # => "."
i
= d...
....tell # => 12
d.read # => ".."
d.seek(i) # => #<Dir:0x401b3c40>
d.read # => ".."
end

//}...

IO#pos=(n) (21118.0)

ファイルポインタを指定位置に移動します。 IO#seek(n, IO::SEEK_SET) と同じです。

...す。
I
O#seek(n, IO::SEEK_SET) と同じです。

@param n 先頭からのオフセットを整数で指定します。

@raise IOError 既に close されている場合に発生します。

//emlist[例][ruby]{
I
O.write("testfile", "This is line one\nThis is line two\n")
File.open("testfile") d...
...o |f|
f.pos # => 0
f.pos = 17
f.gets # => "This is line two\n"
end

//}...

Dir#seek(pos) -> self (6024.0)

ディレクトリストリームの読み込み位置を pos に移動させます。 pos は Dir#tell で与えられた値でなければなりま せん。

...は Dir#tell で与えられた値でなければなりま
せん。

@param pos 変更したい位置を整数で与えます。

@raise IOError 既に自身が close している場合に発生します。

//emlist[例][ruby]{
Dir.open("testdir") do |d|
d.read # => "."
i
= d...
....tell # => 12
d.read # => ".."
d.seek(i) # => #<Dir:0x401b3c40>
d.read # => ".."
end

//}...

ruby 1.6 feature (1404.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) ->...
...[i586-linux])

=> ruby: No program input from stdin allowed in tainted mode (SecurityError)

=> ruby 1.6.7 (2002-07-30) [i586-linux]

: 2002-05-20 IO#close

双方向のパイプの dup を close_write するとエラーになっていました。
((<ruby-dev:17155>))

open
(...
..."|-","r+") {|f|
i
f f
f.dup.close_write
else
sleep 1
end

}

=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duplex IO for writing (IOError)
from -:3
from -:1:in `open'
from -:1


=> rub...