5594件ヒット
[5501-5594件を表示]
(0.040秒)
別のキーワード
クラス
-
ARGF
. class (462) - Array (118)
- Binding (6)
- Class (11)
- Complex (33)
- Dir (18)
- Encoding (22)
-
Encoding
:: Converter (99) -
Encoding
:: InvalidByteSequenceError (22) -
Encoding
:: UndefinedConversionError (55) - Enumerator (22)
- Exception (146)
- Fiber (5)
- File (513)
- Float (33)
- IO (1625)
- Integer (33)
- Method (11)
- Module (24)
- NilClass (33)
- Numeric (11)
- Object (97)
- Proc (11)
- Rational (315)
- Regexp (44)
- RubyVM (11)
-
RubyVM
:: InstructionSequence (225) - SignalException (55)
- StopIteration (11)
- String (174)
- Symbol (32)
- Thread (120)
-
Thread
:: Backtrace :: Location (77) -
Thread
:: ConditionVariable (36) - Time (22)
- TracePoint (17)
- UnboundMethod (11)
キーワード
-
$ ! (11) -
$ . (11) -
$ < (11) -
$ > (11) -
$ stderr (11) -
$ stdin (11) -
$ stdout (11) - * (11)
- ** (11)
- + (11)
- - (11)
- -@ (8)
-
/ (11) - << (11)
- <=> (11)
- == (22)
- Complex (12)
- ConditionVariable (18)
- Constants (11)
- EIO (11)
- ENXIO (11)
- EREMOTEIO (11)
- Encoding (11)
- Exception (11)
- File (11)
- Float (6)
-
INSTRUCTION
_ NAMES (11) - IO (11)
- IOError (11)
- InstructionSequence (11)
- Integer (6)
- Location (11)
-
MAJOR
_ VERSION (11) -
MINOR
_ VERSION (11) -
PRIO
_ PGRP (11) -
PRIO
_ PROCESS (11) -
PRIO
_ USER (11) -
RUBY
_ DESCRIPTION (11) -
RUBY
_ ENGINE _ VERSION (9) -
RUBY
_ REVISION (11) -
RUBY
_ VERSION (11) - Rational (22)
-
SEEK
_ CUR (11) -
SEEK
_ DATA (11) -
SEEK
_ END (11) -
SEEK
_ HOLE (11) -
SEEK
_ SET (11) - STDERR (11)
- STDIN (11)
- STDOUT (11)
- SignalException (11)
- StopIteration (11)
- Thread (11)
- UndefinedConversionError (11)
- WaitReadable (11)
- WaitWritable (11)
- ZeroDivisionError (11)
-
abort
_ on _ exception (22) -
abort
_ on _ exception= (22) - abs (8)
-
absolute
_ path (22) - advise (11)
- atime (22)
- autoclose= (11)
- autoclose? (11)
- backtrace (11)
-
backtrace
_ locations (33) -
base
_ label (22) - binmode (22)
- binmode? (22)
- binread (11)
- binwrite (11)
- birthtime (10)
- blockdev? (22)
- broadcast (9)
- bytes (14)
-
caller
_ locations (22) - capitalize (16)
- capitalize! (8)
- cause (11)
- ceil (11)
- chardev? (22)
- chars (14)
- chown (11)
- chr (11)
- chunk (11)
- clone (11)
- close (11)
-
close
_ on _ exec= (11) -
close
_ on _ exec? (11) -
close
_ read (11) -
close
_ write (11) - closed? (22)
- codepoints (14)
- coerce (11)
- combination (22)
- compile (22)
-
compile
_ file (11) -
compile
_ option (11) -
compile
_ option= (11) -
const
_ source _ location (5) - convert (11)
-
copy
_ stream (22) - ctime (22)
-
default
_ internal (11) - delete (11)
- denominator (11)
-
destination
_ encoding (33) -
destination
_ encoding _ name (22) - directory? (22)
- disasm (22)
- disassemble (22)
- display (11)
- downcase (16)
- downcase! (8)
- dummy? (11)
- dump (22)
- dup (11)
- each (110)
-
each
_ byte (44) -
each
_ char (44) -
each
_ codepoint (22) -
each
_ line (110) - empty? (24)
- encode (33)
- encode! (22)
- eof (22)
- eof? (22)
-
error
_ char (11) - eval (11)
- exception (33)
- exec (44)
-
executable
_ real? (11) - exist? (22)
-
external
_ encoding (22) - fcntl (11)
- fdatasync (11)
- fdiv (11)
- file (11)
- file? (22)
- fileno (21)
-
first
_ lineno (11) - flock (11)
- floor (11)
- flush (11)
- fnmatch (11)
- fnmatch? (11)
-
for
_ fd (11) - foreach (22)
- fork (22)
- fsync (11)
- getbyte (11)
- getc (11)
- getpriority (11)
- gets (66)
- grpowned? (22)
- hash (11)
- identical? (22)
- inspect (44)
-
instruction
_ sequence (6) -
internal
_ encoding (22) - intersection (5)
- ioctl (11)
- isatty (11)
- label (22)
-
last
_ error (11) - lchmod (11)
- lchown (11)
- lineno (22)
- lineno= (11)
- lines (42)
- link (11)
- load (11)
-
load
_ from _ binary (9) -
load
_ from _ binary _ extra _ data (9) - lstat (22)
- magnitude (8)
-
marshal
_ dump (11) -
module
_ function (19) - mtime (22)
- negative? (8)
- new (119)
- next (11)
-
next
_ values (11) - numerator (11)
- of (11)
- open (66)
- owned? (22)
- pack (19)
- partition (33)
- path (24)
- permutation (22)
- pid (11)
- pipe (88)
- pipe? (22)
- popen (154)
- pos (22)
- pos= (22)
- positive? (8)
- pread (7)
-
primitive
_ convert (44) - print (22)
- printf (33)
- priority (11)
- priority= (11)
- putc (22)
- puts (22)
- pwrite (7)
- quo (22)
- raise (5)
-
raised
_ exception (11) - rationalize (99)
- read (55)
-
read
_ nonblock (22) - readable? (22)
-
readable
_ real? (11) - readbyte (11)
- readchar (11)
- readline (33)
- readlines (99)
- readlink (11)
- readpartial (22)
- reopen (33)
-
repeated
_ combination (22) -
repeated
_ permutation (22) -
report
_ on _ exception (16) -
report
_ on _ exception= (16) - restore (11)
- result (11)
- rewind (11)
- round (11)
- rpartition (11)
-
search
_ convpath (11) - seek (22)
- select (22)
-
set
_ backtrace (11) -
set
_ encoding (66) -
set
_ encoding _ by _ bom (5) - setgid? (22)
- setpriority (11)
- setuid? (22)
- signal (9)
- signm (11)
- signo (11)
- size (22)
- size? (22)
-
slice
_ before (22) - socket? (22)
-
source
_ encoding (11) -
source
_ encoding _ name (11) -
source
_ location (39) - spawn (44)
- stat (22)
- sticky? (22)
- subsec (11)
- superclass (11)
- swapcase (16)
- swapcase! (8)
- symlink? (22)
- sync (11)
- sync= (11)
- sysopen (11)
- sysread (11)
- sysseek (11)
- system (44)
- syswrite (11)
- tell (22)
- test (22)
-
to
_ a (44) -
to
_ binary (9) -
to
_ f (11) -
to
_ i (22) -
to
_ io (33) -
to
_ path (2) -
to
_ r (77) -
to
_ s (33) -
to
_ tty? (7) -
to
_ write _ io (11) - truncate (33)
-
try
_ convert (11) - tty? (11)
- ungetbyte (11)
- ungetc (11)
- union (17)
- unlink (11)
- unpack (11)
- upcase (16)
- upcase! (8)
-
verify
_ compaction _ references (5) - wait (9)
-
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
- write (44)
-
write
_ nonblock (11) - zero? (22)
検索結果
先頭5件
-
Kernel
$ $ stdout -> object (8.0) -
標準出力です。
...TDOUT # 元に戻す
//}
自プロセスだけでなく、子プロセスの標準出力もリダイレクトしたいときは
以下のように IO#reopen を使います。
//emlist[例][ruby]{
STDOUT.reopen("/tmp/foo", "w")
//}
また、リダイレクトしたあと
出力先をまた元... -
Kernel
. # print(*arg) -> nil (8.0) -
引数を順に標準出力 $stdout に出力します。引数が与えられない時には変数 $_ の値を出力します。
...ットされている時には、最後にそれを出力します。
@param arg 出力するオブジェクトを任意個指定します。
@raise IOError 標準出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発......生します。
//emlist[例][ruby]{
print "Hello, world!"
print "Regexp is",/ant/
print nil
print "\n"
#=> Hello, world!Regexp is(?-mix:ant)
$_ = "input"
$, = "<and>"
$\ = "<end>\n"
print
print "AA","BB"
#=> input<end>
#=> AA<and>BB<end>
//}
@see Kernel.#puts,Kernel.#p,IO#print... -
Kernel
. # putc(ch) -> object (8.0) -
文字 ch を 標準出力 $stdout に出力します。
...数または文字列で指定します。
@return ch を返します
@raise RangeError Bignum を引数にした場合に発生します。
@raise IOError 標準出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生......きないオブジェクトを引数に
指定した場合に発生します。
//emlist[例][ruby]{
putc("ch")
putc(?c)
putc(99)
putc(355)
#=> cccc
putc(99.00) #=> c
putc(33333333333333333333333333333333333) # bignum too big to convert into `long' (RangeError)
//}
@see IO#putc... -
Kernel
. # puts(*arg) -> nil (8.0) -
引数と改行を順番に 標準出力 $stdout に出力します。 引数がなければ改行のみを出力します。
...要素に対しては puts 自身
は改行を出力しません。
@param arg 出力するオブジェクトを任意個指定します。
@raise IOError 標準出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生......します。
//emlist[例][ruby]{
puts "foo", "bar\n", "baz"
puts "" # 改行のみ出力
puts # 改行のみ出力
puts nil # 改行のみ出力
puts ["oui", "non"]
#=> foo
# bar
# baz
#
#
#
# oui
# non
//}
@see Kernel.#print, Kernel.#p, IO#puts... -
Marshal
. # load(port , proc = nil) -> object (8.0) -
port からマーシャルデータを読み込んで、元のオブジェクトと同 じ状態をもつオブジェクトを生成します。
...a"
# 1
# 10000000000
# 1.0
# :foo
# ["a", 1, 10000000000, 1.0, :foo]
# ["a", 1, 10000000000, 1.0, :foo]
//}
@param port String か IO (またはそのサブクラス)の
インスタンスを指定します。
@param proc 手続きオブジェクト。Proc
@raise Typ... -
Marshal
. # restore(port , proc = nil) -> object (8.0) -
port からマーシャルデータを読み込んで、元のオブジェクトと同 じ状態をもつオブジェクトを生成します。
...a"
# 1
# 10000000000
# 1.0
# :foo
# ["a", 1, 10000000000, 1.0, :foo]
# ["a", 1, 10000000000, 1.0, :foo]
//}
@param port String か IO (またはそのサブクラス)の
インスタンスを指定します。
@param proc 手続きオブジェクト。Proc
@raise Typ... -
Object
# display(out = $ stdout) -> nil (8.0) -
オブジェクトを out に出力します。
...されています。
//emlist[][ruby]{
class Object
def display(out = $stdout)
out.write self
nil
end
end
//}
@param out 出力先のIOオブジェクトです。指定しない場合は標準出力に出力されます。
@return nil を返します。
//emlist[][ruby]{
Object.new.d... -
String
# chr -> String (8.0) -
self の最初の文字だけを含む文字列を返します。
...self の最初の文字だけを含む文字列を返します。
//emlist[例][ruby]{
a = "abcde"
a.chr #=> "a"
//}
Ruby 1.9 で IO#getc の戻り値が Integer から String を返すように変更になりました。
Ruby 1.8 以前と1.9以降の互換性を保つために String#chr... -
Thread (8.0)
-
スレッドを表すクラスです。スレッドとはメモリ空間を共有して同時に実行される制御の流れです。 Thread を使うことで並行プログラミングが可能になります。
...は Ruby VM は Giant VM lock (GVL) を有しており、同時に実行される
ネイティブスレッドは常にひとつです。
ただし、IO 関連のブロックする可能性があるシステムコールを行う場合には
GVL を解放します。その場合にはスレッドは......レッドの実行も終
了します。ブロックの終了は正常な終了も例外などによる異常終了も含みます。
===[a:exception] 例外発生時のスレッドの振る舞い
あるスレッドで例外が発生し、そのスレッド内で rescue で捕捉されなかっ......read.new do
Thread.pass # メインスレッドが確実にjoinするように
raise "unhandled exception"
end
t.join
rescue
p $! # => "unhandled exception"
end
また、以下の 3 つの方法により、いずれかのスレッドが例外によって終
了した...