種類
ライブラリ
- English (300)
- ビルトイン (3818)
- benchmark (12)
- bigdecimal (36)
- continuation (48)
- csv (12)
- delegate (12)
- digest (12)
-
drb
/ extservm (12) - e2mmap (18)
-
irb
/ cmd / load (24) -
irb
/ xmp (24) - json (36)
-
minitest
/ spec (2) -
minitest
/ unit (2) - mkmf (1092)
- open-uri (80)
- open3 (24)
- openssl (24)
- pathname (24)
- pp (16)
- profiler (6)
- psych (24)
- pty (48)
- rake (156)
- rubygems (12)
-
rubygems
/ commands / lock _ command (12) -
rubygems
/ custom _ require (12) -
rubygems
/ timer (12) - scanf (30)
- shell (12)
-
shell
/ command-processor (18) -
shell
/ filter (12) - socket (96)
- stringio (108)
- syslog (108)
- tempfile (55)
-
test
/ unit (1) - timeout (37)
- tracer (36)
- un (156)
- uri (12)
-
webrick
/ utils (12) - win32ole (12)
- zlib (48)
クラス
-
ARGF
. class (192) - Array (72)
- BasicObject (24)
-
Benchmark
:: Tms (12) - BigDecimal (12)
- Binding (12)
- CSV (12)
- Complex (24)
- Continuation (24)
-
DRb
:: ExtServManager (12) - Enumerator (12)
- Exception (24)
- File (36)
- IO (468)
-
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Require (12) - LoadError (12)
- Method (12)
- Module (180)
- Object (205)
-
OpenSSL
:: BN (12) - Proc (19)
- Random (103)
- Rational (12)
- Shell (12)
-
Shell
:: CommandProcessor (18) -
Shell
:: Filter (12) - Socket (48)
- String (84)
- StringIO (108)
- SystemExit (12)
- Tempfile (55)
- Thread (96)
-
Thread
:: Backtrace :: Location (12) - TracePoint (12)
- Tracer (36)
- UnboundMethod (24)
- UncaughtThrowError (22)
-
WIN32OLE
_ EVENT (12) - XMP (12)
-
Zlib
:: GzipWriter (48)
モジュール
- Exception2MessageMapper (18)
- FileTest (12)
- FileUtils (24)
- Kernel (3778)
-
MiniTest
:: Assertions (2) - Open3 (24)
-
OpenSSL
:: Buffering (12) - OpenURI (24)
-
OpenURI
:: OpenRead (24) - PTY (48)
- Process (96)
-
Socket
:: Constants (48) - Syslog (108)
-
Test
:: Unit (1) - Timeout (21)
- URI (16)
-
WEBrick
:: Utils (12) - Warning (18)
キーワード
-
$ ! (12) -
$ " (12) -
$ $ (12) -
$ & (12) -
$ & # 39; (12) -
$ * (12) -
$ + (12) -
$ , (12) -
$ -0 (12) -
$ -F (12) -
$ -I (12) -
$ -K (12) -
$ -W (12) -
$ -a (12) -
$ -d (12) -
$ -i (12) -
$ -l (12) -
$ -p (12) -
$ -v (12) -
$ -w (12) -
$ . (12) -
$ / (12) -
$ 0 (12) -
$ 1 (12) -
$ 10 (12) -
$ 11 (12) -
$ 2 (12) -
$ 3 (12) -
$ 4 (12) -
$ 5 (12) -
$ 6 (12) -
$ 7 (12) -
$ 8 (12) -
$ 9 (12) -
$ : (12) -
$ ; (12) -
$ < (12) -
$ = (12) -
$ > (12) -
$ ? (12) -
$ @ (12) -
$ ARGV (12) -
$ CFLAGS (12) -
$ CHILD _ STATUS (12) -
$ DEBUG (12) -
$ DEFAULT _ INPUT (12) -
$ DEFAULT _ OUTPUT (12) -
$ ERROR _ INFO (12) -
$ ERROR _ POSITION (12) -
$ FIELD _ SEPARATOR (12) -
$ FILENAME (12) -
$ FS (12) -
$ IGNORECASE (12) -
$ INPUT _ LINE _ NUMBER (12) -
$ INPUT _ RECORD _ SEPARATOR (12) -
$ KCODE (12) -
$ LAST _ MATCH _ INFO (12) -
$ LAST _ PAREN _ MATCH (12) -
$ LAST _ READ _ LINE (12) -
$ LDFLAGS (12) -
$ LOADED _ FEATURES (12) -
$ LOAD _ PATH (12) -
$ MATCH (12) -
$ NR (12) -
$ OFS (12) -
$ ORS (12) -
$ OUTPUT _ FIELD _ SEPARATOR (12) -
$ OUTPUT _ RECORD _ SEPARATOR (12) -
$ PID (12) -
$ POSTMATCH (12) -
$ PREMATCH (12) -
$ PROCESS _ ID (12) -
$ PROGRAM _ NAME (12) -
$ RS (12) -
$ SAFE (12) -
$ VERBOSE (12) -
$ \ (12) -
$ _ (12) -
$ ` (12) -
$ archdir (12) -
$ defs (12) -
$ hdrdir (12) -
$ libdir (12) -
$ libs (12) -
$ sitearchdir (12) -
$ sitelibdir (12) -
$ srcdir (12) -
$ stderr (12) -
$ stdin (12) -
$ stdout (12) -
$ topdir (12) -
$ ~ (12) - % (12)
-
AI
_ V4MAPPED _ CFG (24) - ARGF (24)
- Array (12)
- BasicObject (12)
- BigDecimal (24)
- Binding (12)
- CONFIG (12)
- Complex (36)
- Continuation (12)
- Converters (12)
- DATA (12)
- DEFAULT (7)
- DefaultLoader (12)
- DelegateClass (12)
- Digest (12)
- File (12)
- Float (12)
- Hash (12)
- Integer (12)
- JSON (12)
- LoadError (12)
- Location (12)
- LockCommand (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Pathname (24)
- Proc (12)
-
Profiler
_ _ (6) - Rational (24)
- Rubyの起動 (12)
- Ruby用語集 (12)
- RuntimeError (12)
-
SCRIPT
_ LINES _ _ (12) -
SO
_ ATTACH _ FILTER (24) -
SO
_ DETACH _ FILTER (24) -
SO
_ NKE (24) - Scanf (6)
- String (12)
- Task (12)
- ThreadError (12)
- TracePoint (12)
- URI (12)
- UncaughtThrowError (11)
- Win32ネイティブ版Rubyの互換性問題 (12)
- [] (30)
-
_ _ callee _ _ (12) -
_ _ dir _ _ (12) -
_ _ method _ _ (12) - ` (12)
- abort (48)
-
add
_ filter (24) -
add
_ trace _ func (12) - alert (12)
-
alias
_ method (12) - ancestors (12)
-
arg
_ config (12) -
assert
_ throws (1) -
at
_ exit (12) - autoload (24)
- autoload? (24)
-
backtrace
_ locations (24) - bigdecimal (12)
-
bind
_ call (12) - binding (12)
- binread (12)
- binwrite (12)
-
block
_ given? (12) - call (12)
- callcc (12)
- caller (36)
-
caller
_ locations (24) - catch (24)
-
cc
_ command (12) -
check
_ signedness (24) -
check
_ sizeof (24) - chmod (12)
- chomp (12)
- chop (12)
- class (12)
-
class
_ eval (24) -
class
_ variables (12) - command (12)
-
const
_ defined? (12) - constants (24)
- convert (12)
-
convertible
_ int (24) - cp (12)
-
cpp
_ command (12) - create (22)
-
create
_ header (12) -
create
_ makefile (12) -
create
_ tmpsrc (12) - crit (12)
- debug (12)
-
def
_ exception (6) -
defined
_ class (12) - delegate (12)
-
depend
_ rules (12) - desc (12)
- describe (1)
-
dir
_ config (12) - directory (12)
-
drb
/ extservm (12) -
dummy
_ makefile (12) -
egrep
_ cpp (24) - emerg (12)
-
enable
_ config (24) - err (12)
- eval (36)
- exception (24)
- exec (48)
- execute (24)
- exit (36)
- exit! (24)
- fail (36)
- file (12)
-
file
_ create (12) -
find
_ executable (12) -
find
_ header (12) -
find
_ library (24) -
find
_ type (24) -
for
_ fd (12) - foreach (24)
- fork (48)
- format (24)
- freeze (12)
- gem (12)
- getpty (24)
- gets (48)
-
global
_ variables (12) - gsub (36)
-
have
_ devel? (12) -
have
_ framework (24) -
have
_ func (24) -
have
_ header (24) -
have
_ library (24) -
have
_ macro (24) -
have
_ struct _ member (24) -
have
_ type (24) -
have
_ var (24) - help (12)
- hex (12)
- httpd (12)
- identical? (12)
- import (12)
- include (12)
- info (12)
- inspect (12)
- install (12)
-
install
_ files (12) -
install
_ rb (12) -
instance
_ eval (24) -
instance
_ variables (12) - irb (12)
-
irb
/ xmp (12) - iterator? (12)
- j (12)
- jj (12)
- kill (24)
- lambda (18)
- libpathflag (12)
-
link
_ command (12) - ln (12)
- load (12)
-
local
_ variables (12) - log (12)
-
log
_ src (12) - loop (24)
- mathn (4)
-
merge
_ libs (12) - method (12)
-
minitest
/ autorun (12) -
minitest
/ unit (1) - mkdir (12)
- mkmf (24)
- modified? (12)
-
module
_ eval (24) - multitask (12)
-
must
_ throw (1) - mv (12)
- namespace (12)
- new (90)
- next (12)
- notice (12)
- oct (12)
- open (174)
- open-uri (6)
-
open
_ uri (24) - owner (24)
- p (12)
- path (12)
- popen (168)
- popen3 (24)
- pp (24)
-
pretty
_ print (24) - print (72)
- printf (84)
- proc (19)
-
psych
_ y (12) -
public
_ instance _ method (12) - putc (48)
- puts (60)
- raise (48)
- rand (96)
-
rb
_ String (12) -
rb
_ exec _ end _ proc (12) -
rb
_ f _ array (12) -
rb
_ f _ float (12) -
rb
_ f _ hash (12) -
rb
_ f _ integer (12) -
rb
_ f _ string (12) -
rb
_ load (12) - read (36)
- readline (48)
- readlines (84)
- rect (12)
- rectangular (12)
-
remove
_ const (12) - reopen (60)
- require (24)
-
require
_ relative (12) - rm (12)
-
rm
_ f (12) -
rm
_ rf (12) - rmdir (12)
- ruby (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 8 . 5 feature (12) -
ruby 1
. 9 feature (12) -
rubygems
/ commands / lock _ command (12) -
rubygems
/ custom _ require (12) - rule (12)
-
run
_ config (6) - sample (48)
- scanf (24)
- select (24)
- send (24)
-
set
_ close _ on _ exec (12) -
set
_ trace _ func (36) -
setup
_ argv (1) - sh (12)
- shuffle! (24)
-
singleton
_ method (12) - skip (1)
- sleep (24)
- spawn (84)
- sprintf (12)
- sprintf フォーマット (12)
- srand (48)
- status (12)
- sub (24)
- syscall (12)
- sysopen (12)
- system (48)
- tag (11)
- task (12)
- terminate (12)
- test (42)
- throw (12)
- time (12)
- timeout (37)
-
to
_ a (48) -
to
_ ary (12) -
to
_ f (12) -
to
_ i (12) -
to
_ int (12) -
to
_ r (12) -
to
_ s (24) -
to
_ str (12) - touch (12)
-
trace
_ var (36) - tracer (12)
- trap (24)
-
try
_ compile (24) -
try
_ constant (24) -
try
_ cpp (24) -
try
_ do (24) -
try
_ func (24) -
try
_ link (24) -
try
_ run (24) -
try
_ static _ assert (24) -
try
_ type (24) -
try
_ var (24) - ubygems (4)
-
untrace
_ var (12) - value (11)
- verbose= (12)
-
wait
_ writable (12) - warn (30)
- warning (12)
-
webrick
/ https (12) -
webrick
/ httpservlet (12) -
with
_ config (24) -
with
_ werror (24) - write (24)
- xmp (12)
- xpopen (24)
- xsystem (12)
- y (12)
- このマニュアルのヘルプ (12)
- クラス/メソッドの定義 (12)
- セキュリティモデル (12)
- 制御構造 (12)
- 変数と定数 (12)
- 手続きオブジェクトの挙動の詳細 (12)
- 環境変数 (12)
- 終了処理 (12)
検索結果
先頭5件
-
Kernel (38000.0)
-
全てのクラスから参照できるメソッドを定義しているモジュール。 Object クラスはこのモジュールをインクルードしています。
全てのクラスから参照できるメソッドを定義しているモジュール。
Object クラスはこのモジュールをインクルードしています。
Object クラスのメソッドは実際にはこのモジュールで定義されていま
す。これはトップレベルでのメソッドの再定義に対応するためです。 -
Kernel
$ $ _ -> String | nil (21056.0) -
最後に Kernel.#gets または Kernel.#readline で読み込んだ文字列です。 EOF に達した場合には、 nil になります。 (覚え方: Perlと同じ)
...最後に Kernel.#gets または Kernel.#readline で読み込んだ文字列です。
EOF に達した場合には、 nil になります。
(覚え方: Perlと同じ)
Kernel.#print のような Perl 由来の幾つかのメソッドは、引数を省略すると代わりに $_ を利用します......。
この変数はローカルスコープかつスレッドローカルです。
Ruby起動時の初期値は nil です。
@see Kernel.#print, Kernel.#gets, Kernel.#readline, Object::ARGF
=== 例
example.txt:
foo
bar
baz
このとき、コマンド ruby -e 'print while gets' example.txt... -
Kernel
. # exec(env , program , *args , options={}) -> () (21036.0) -
引数で指定されたコマンドを実行します。
...イルデスクリプタなど)引き継ぎます。
Hash を options として渡すことで、この挙動を変更できます。
詳しくは Kernel.#spawn を参照してください。
=== 引数の解釈
この形式で呼び出した場合、空白や shell のメタキャラクタも
そ......替えて以下を実行
$ ps aux|grep sleep
xxxx 32754 0.0 0.0 2580 468 pts/3 S+ 22:01 0:00 mysleep 600
xxxx 32761 0.0 0.0 2824 792 pts/6 S+ 22:01 0:00 grep sleep
@see Kernel.#system,Kernel.#`,Kernel.#spawn,Kernel.#fork,IO.popen,IO.pipe,Kernel.#open,exec(3)... -
Kernel
. # exec(program , *args , options={}) -> () (21036.0) -
引数で指定されたコマンドを実行します。
...イルデスクリプタなど)引き継ぎます。
Hash を options として渡すことで、この挙動を変更できます。
詳しくは Kernel.#spawn を参照してください。
=== 引数の解釈
この形式で呼び出した場合、空白や shell のメタキャラクタも
そ......替えて以下を実行
$ ps aux|grep sleep
xxxx 32754 0.0 0.0 2580 468 pts/3 S+ 22:01 0:00 mysleep 600
xxxx 32761 0.0 0.0 2824 792 pts/6 S+ 22:01 0:00 grep sleep
@see Kernel.#system,Kernel.#`,Kernel.#spawn,Kernel.#fork,IO.popen,IO.pipe,Kernel.#open,exec(3)... -
Kernel
# create _ header(header = "extconf . h") -> String (21032.0) -
Kernel#have_func, Kernel#have_header などの検査結果を元に、 ヘッダファイルを生成します。
...
Kernel#have_func, Kernel#have_header などの検査結果を元に、
ヘッダファイルを生成します。
このメソッドは extconf.rb の最後で呼び出すようにしてください。
@param header ヘッダファイルの名前を指定します。
@return ヘッダファイ... -
Kernel
. # exit!(status = false) -> () (21030.0) -
Rubyプログラムの実行を即座に終了します。 status として整数が与えられた場合、その値を Ruby コマンドの終了ステータスとします。 デフォルトの終了ステータスは 1 です。
...XIT_FAILURE の値なので、正確には環境依存です。
exit! は exit とは違って、例外処理などは一切行ないませ
ん。 Kernel.#fork の後、子プロセスを終了させる時などに用
いられます。
@param status 終了ステータスを整数か true また......T.sync = true #表示前に終了しないようにする
puts 'start'
begin
puts 'start1...'
exit!
ensure
puts 'end1...' #実行されない
end
puts 'end' #実行されない
#=> start
# start1...
#終了ステータス:1
//}
@see Kernel.#exit,Kernel.#abort,Kernel.#at_exit,Kernel.#fork... -
Kernel
. # open(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO | Tempfile | IO (21030.0) -
name が http:// や ftp:// で始まっている文字列なら URI のリソースを 取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。 返されるオブジェクトは OpenURI::Meta モジュールで extend されています。
...ock) のように name の open メソッドが呼ばれます。
これ以外の場合は、name はファイル名として扱われ、従来の
Kernel.#open(name, *rest) が呼ばれます。
ブロックを与えた場合は上の場合と同様、name が http:// や ftp:// で
始まって......uby2.7以降、open-uriにより拡張されたKernel.openでURLを開くときにwarningが表示されるようになりました。
require 'open-uri'
open("http://www.ruby-lang.org/") {|f|
# ...
}
#=> warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or......ram mode モードを文字列で与えます。Kernel.#open と同じです。
@param perm open(2) の第 3 引数のように、ファイルを生成する場合のファイルのパーミッションを
整数で指定します。Kernel.#open と同じです
@param options ハッシ... -
Kernel
. # open(name , mode = & # 39;r& # 39; , perm = nil , options = {}) {|ouri| . . . } -> object (21030.0) -
name が http:// や ftp:// で始まっている文字列なら URI のリソースを 取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。 返されるオブジェクトは OpenURI::Meta モジュールで extend されています。
...ock) のように name の open メソッドが呼ばれます。
これ以外の場合は、name はファイル名として扱われ、従来の
Kernel.#open(name, *rest) が呼ばれます。
ブロックを与えた場合は上の場合と同様、name が http:// や ftp:// で
始まって......uby2.7以降、open-uriにより拡張されたKernel.openでURLを開くときにwarningが表示されるようになりました。
require 'open-uri'
open("http://www.ruby-lang.org/") {|f|
# ...
}
#=> warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or......ram mode モードを文字列で与えます。Kernel.#open と同じです。
@param perm open(2) の第 3 引数のように、ファイルを生成する場合のファイルのパーミッションを
整数で指定します。Kernel.#open と同じです
@param options ハッシ... -
Kernel
. # autoload(const _ name , feature) -> nil (21028.0) -
定数 const_name を最初に参照した時に feature を Kernel.#require するように設定します。
...定数 const_name を最初に参照した時に feature を
Kernel.#require するように設定します。
const_name には、 "::" 演算子を含めることはできません。
ネストした定数を指定する方法は Module#autoload を参照してください。
const_name が aut......対象を指定します。
@raise LoadError featureのロードに失敗すると発生します。
//emlist[][ruby]{
# ------- /tmp/foo.rb ---------
class Bar
end
# ----- end of /tmp/foo.rb ----
autoload :Bar, '/tmp/foo'
p Bar #=> Bar
//}
@see Kernel.#autoload?,Module#autoload,Kernel.#require... -
Kernel
. # catch {|tag| . . . . } -> object (21028.0) -
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
...
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
ブロックの実行中に tag と同一のオブジェクトを引数とする Kernel.#throw が行われた
場合は、その throw の第二引数を戻り値として、ブロック......@return ブロックの返り値か、対応するthrowの第二引数を返り値として返します。
//emlist[例][ruby]{
result = catch do |tag|
for i in 1..2
for j in 1..2
for k in 1..2
throw tag, k
end
end
end
end
p result #=> 1
//}
@see Kernel.#throw...