55件ヒット
[1-55件を表示]
(0.269秒)
クラス
-
ARGF
. class (33) - IO (22)
キーワード
- binmode? (22)
-
internal
_ encoding (11)
検索結果
先頭5件
-
IO
# binmode -> self (26134.0) -
ストリームをバイナリモードにします。MSDOS などバイナリモードの存在 する OS でのみ有効です。そうでない場合このメソッドは何もしません。
...ンしかありません。
@raise Errno::EXXX モードの変更に失敗した場合に発生します。
//emlist[例][ruby]{
IO.open(IO.sysopen("testfile", "w+")) do |io|
io.binmode? # => false
io.binmode # => #<IO:fd 8>
io.binmode? # => true
end
//}
@see c:IO#io_binmode, IO#binmode?... -
ARGF
. class # binmode -> self (26122.0) -
self をバイナリモードにします。一度バイナリモードになった後は非バイナリ モードに戻る事はできません。
...test1.png + test2.png = 292B
# $ ruby test.rb test1.png test2.png
ARGF.binmode
ARGF.read.size # => 292
例:
# test1.png - 164B
# test2.png - 128B
# test1.png + test2.png = 292B
# $ ruby test.rb test1.png test2.png
ARGF.read.size # => 290
@see IO#binmode, ARGF.class#binmode?... -
ARGF
. class # binmode? -> bool (14140.0) -
ARGF の入力ストリームがバイナリモードなら true を返します。 そうでない場合、false を返します。
...ムがバイナリモードなら true を返します。
そうでない場合、false を返します。
バイナリモードにするためには ARGF.class#binmode を使用します。
ARGF.binmode? # => false
ARGF.binmode
ARGF.binmode? # => true
@see IO#binmode?, ARGF.class#binmode... -
IO
# binmode? -> bool (14116.0) -
自身がバイナリモードなら true を返します。そうでない場合、false を返します。
...自身がバイナリモードなら true を返します。そうでない場合、false を返します。
@see c:IO#io_binmode, IO#binmode... -
ARGF
. class # internal _ encoding -> Encoding | nil (8009.0) -
ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...$ ruby -Eutf-8 test.rb
# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('utf-8','ascii')
ARGF.internal_encoding # => #<Encoding:US-ASCII>
例:
ARGF.binmode
ARGF.internal_encoding # => nil
@see IO, ARGF.class#external_encoding...