6289件ヒット
[1-100件を表示]
(0.155秒)
種類
ライブラリ
- English (132)
- ビルトイン (2871)
- benchmark (33)
- continuation (11)
- coverage (6)
- csv (253)
- fiber (8)
-
fiddle
/ import (11) - gdbm (11)
- json (11)
- matrix (22)
- mkmf (44)
-
mutex
_ m (11) -
net
/ ftp (18) -
net
/ http (198) -
net
/ imap (33) -
net
/ pop (165) -
net
/ smtp (33) - nkf (11)
- objspace (11)
- openssl (33)
- optparse (308)
- pathname (44)
- pp (11)
- prettyprint (12)
- prime (66)
- pstore (22)
- psych (22)
- rake (187)
-
rake
/ loaders / makefile (11) -
rake
/ packagetask (99) - readline (44)
-
rexml
/ document (22) -
rexml
/ parsers / sax2parser (55) -
rinda
/ tuplespace (11) -
ripper
/ lexer (18) -
rubygems
/ dependency _ list (11) - set (22)
- shell (24)
-
shell
/ command-processor (18) -
shell
/ filter (24) - socket (22)
- strscan (22)
- syslog (44)
- tempfile (22)
- thread (10)
- thwait (30)
- time (22)
- timeout (19)
- tmpdir (22)
- tracer (44)
- tsort (43)
-
webrick
/ httpproxy (11) -
webrick
/ httputils (66) - win32ole (242)
- zlib (352)
クラス
-
ARGF
. class (88) - Array (129)
- BasicObject (33)
- BasicSocket (22)
- Binding (10)
- CSV (220)
-
CSV
:: FieldInfo (33) - Class (11)
- Coverage (6)
- Data (4)
- Dir (198)
- Enumerator (22)
-
Enumerator
:: ArithmeticSequence (11) -
Enumerator
:: Lazy (11) -
Enumerator
:: Yielder (27) - Exception (33)
- Fiber (22)
- File (33)
-
File
:: Stat (66) - GDBM (11)
-
Gem
:: DependencyList (11) - Hash (11)
- IO (536)
- LoadError (11)
- MatchData (92)
- Matrix (22)
- Method (21)
- Module (165)
-
Net
:: FTP (18) -
Net
:: HTTP (132) -
Net
:: HTTPGenericRequest (22) -
Net
:: HTTPResponse (11) -
Net
:: IMAP (22) -
Net
:: IMAP :: Envelope (11) -
Net
:: POP3 (66) -
Net
:: POPMail (99) -
Net
:: SMTP (33) - Numeric (84)
- Object (88)
-
OpenSSL
:: SSL :: SSLContext (11) -
OpenSSL
:: SSL :: SSLSocket (11) - OptionParser (308)
- PStore (22)
- Pathname (44)
- PrettyPrint (12)
- Prime (22)
-
Prime
:: PseudoPrimeGenerator (44) - Proc (11)
-
REXML
:: Attributes (22) -
REXML
:: Parsers :: SAX2Parser (55) -
Rake
:: FileList (22) -
Rake
:: FileTask (22) -
Rake
:: MakefileLoader (11) -
Rake
:: PackageTask (99) - Random (22)
- Range (11)
- Regexp (55)
-
Rinda
:: TupleSpace (11) - Ripper (18)
-
RubyVM
:: InstructionSequence (33) - Set (22)
- Shell (24)
-
Shell
:: CommandProcessor (18) -
Shell
:: Filter (24) - String (84)
- StringScanner (22)
- Struct (14)
- SystemCallError (11)
- Tempfile (22)
- Thread (77)
-
Thread
:: Backtrace :: Location (44) -
Thread
:: Queue (11) -
Thread
:: SizedQueue (33) - ThreadsWait (30)
- Time (22)
- TracePoint (139)
- Tracer (44)
-
WEBrick
:: HTTPProxyServer (11) -
WEBrick
:: HTTPUtils :: FormData (66) - WIN32OLE (44)
-
WIN32OLE
_ EVENT (44) -
WIN32OLE
_ PARAM (22) -
WIN32OLE
_ TYPE (33) -
WIN32OLE
_ VARIABLE (55) -
Zlib
:: Deflate (22) -
Zlib
:: GzipReader (275) -
Zlib
:: GzipWriter (33) -
Zlib
:: Inflate (11)
モジュール
- Benchmark (33)
- Enumerable (154)
-
Fiddle
:: Importer (11) - FileUtils (11)
- JSON (11)
- Kernel (550)
- Math (11)
-
Mutex
_ m (11) -
Net
:: HTTPHeader (33) - ObjectSpace (33)
- Psych (22)
-
Rake
:: TaskManager (77) - RakeFileUtils (44)
- Readline (22)
- Signal (22)
- Syslog (44)
- TSort (43)
- Timeout (19)
オブジェクト
- ENV (22)
-
Readline
:: HISTORY (22)
キーワード
-
$ & (11) -
$ & # 39; (11) -
$ 1 (11) -
$ 10 (11) -
$ 11 (11) -
$ 2 (11) -
$ 3 (11) -
$ 4 (11) -
$ 5 (11) -
$ 6 (11) -
$ 7 (11) -
$ 8 (11) -
$ 9 (11) -
$ CHILD _ STATUS (11) -
$ ERROR _ INFO (11) -
$ ERROR _ POSITION (11) -
$ INPUT _ LINE _ NUMBER (11) -
$ INPUT _ RECORD _ SEPARATOR (11) -
$ LAST _ MATCH _ INFO (11) -
$ LAST _ PAREN _ MATCH (11) -
$ LAST _ READ _ LINE (11) -
$ NR (11) -
$ ORS (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
$ RS (11) -
$ _ (11) -
$ ` (11) -
$ ~ (11) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - < (11)
- << (11)
- <= (11)
- <=> (11)
- == (11)
- =~ (11)
- > (11)
- >= (11)
- ARGF (11)
- ConditionVariable (11)
- Continuation (11)
- DATA (11)
- Digest (11)
- Fiber (11)
- GzipReader (11)
- Location (11)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - NKF (11)
- Numeric (11)
- Options (11)
- Rubyの起動 (11)
- Ruby用語集 (11)
- Status (11)
- TracePoint (11)
-
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ METHOD (11) -
WIN32OLE
_ TYPELIB (11) -
WIN32OLE
_ VARIABLE (11) - [] (117)
-
_ _ callee _ _ (11) -
_ _ method _ _ (11) -
absolute
_ path (22) - accept (22)
-
add
_ filter (22) -
add
_ response _ handler (22) - all (33)
-
all
_ waits (18) - append (18)
-
append
_ features (11) - ascend (11)
- at (11)
-
at
_ exit (11) - autoclose? (11)
- autoload? (11)
- backtrace (11)
-
base
_ label (11) - begin (16)
- benchmark (11)
- bigdecimal (11)
- bind (11)
- binding (11)
- binmode (11)
- blockdev? (11)
- bm (11)
- bmbm (11)
-
body
_ stream (11) -
body
_ stream= (11) - byteoffset (4)
-
callee
_ id (11) - caller (33)
-
caller
_ locations (22) - catch (22)
- cause (11)
- cgi (11)
- chardev? (11)
- chdir (44)
-
class
_ eval (11) - clone (11)
-
close
_ read (11) -
close
_ write (11) - commit (11)
-
completion
_ proc= (11) - convert (22)
- create (22)
- default (11)
-
default
_ event _ sources (11) - define (4)
-
define
_ finalizer (22) -
defined
_ class (11) - deflate (11)
- delete (11)
-
delete
_ all (33) -
delete
_ suffix! (7) - deq (11)
- descend (11)
- disasm (11)
- disassemble (11)
- divide (22)
- dump (11)
- dup (11)
- each (154)
-
each
_ attribute (11) -
each
_ byte (66) -
each
_ codepoint (22) -
each
_ data (11) -
each
_ index (22) -
each
_ line (88) -
each
_ pair (22) -
each
_ strongly _ connected _ component (11) -
each
_ strongly _ connected _ component _ from (21) -
each
_ with _ index (66) - egrep (11)
-
enable
_ config (22) -
enum
_ for (22) - eof (11)
- eof? (11)
- errno (11)
-
eval
_ script (6) - event (11)
- fcntl (11)
- fdatasync (11)
- fetch (44)
- fiddle (11)
-
fiddle
/ import (11) - file (11)
- filename (11)
- filename= (11)
- filter (33)
- find (11)
-
find
_ name (11) - first? (1)
- flush (22)
- foreach (11)
- fork (33)
- format (11)
- gamma (11)
- generate (11)
- get (22)
- get2 (22)
- getc (11)
- getpeereid (11)
- gets (22)
- handler= (11)
- header (11)
-
header
_ convert (22) - help (11)
-
in
_ namespace (11) - index (11)
-
inplace
_ mode= (11) - inspect (33)
-
instance
_ eval (22) -
instance
_ exec (11) -
instance
_ method (11) -
instance
_ variable _ get (11) -
instruction
_ sequence (6) - intern (11)
-
internal
_ encoding (11) - invert (11)
- irb (11)
-
last
_ comment (11) -
last
_ description (11) -
last
_ description= (11) -
last
_ match (11) - lex (7)
- line (11)
-
line
_ stub (6) - lineno (22)
- lineno= (11)
- listen (55)
- load (22)
-
load
_ stream (22) -
local
_ variables (10) - logger (11)
- lookup (11)
- loop (11)
- lstat (11)
- mail (33)
- match (22)
- match? (11)
-
matched
_ size (11) - max (22)
-
max
_ by (44) -
memsize
_ of _ all (11) -
method
_ id (11) - min (44)
- mktmpdir (22)
- mlsd (18)
-
module
_ eval (11) -
module
_ function (12) - name (44)
- name= (11)
-
need
_ zip (11) -
need
_ zip= (11) - needed? (11)
-
net
/ imap (11) -
net
/ pop (11) - new (174)
-
next
_ wait (6) - notify (11)
-
nowrite
_ flag (11) -
nowrite
_ flag= (11) - offset (22)
-
ole
_ func _ methods (11) -
ole
_ get _ methods (11) -
ole
_ query _ interface (11) -
ole
_ type (11) -
ole
_ type _ detail (11) -
on
_ event (11) -
on
_ event _ with _ outargs (11) -
on
_ head (11) -
on
_ tail (11) - open (132)
- open! (11)
- opendir (22)
- output? (11)
- pack (19)
- pack テンプレート文字列 (11)
-
package
_ dir (11) -
package
_ dir= (11) -
package
_ dir _ path (11) -
package
_ files (11) -
package
_ files= (11) - parameters (6)
- parse (44)
- parse! (11)
- pass (11)
- path (33)
- pending (11)
- pid (11)
- pipe (88)
- pop (44)
- popen (154)
- pos (22)
- pos= (22)
- post (22)
- post2 (22)
- pread (7)
-
pretty
_ print (11) - prime (11)
- private (16)
- progids (11)
-
program
_ name (11) -
program
_ name= (11) - public (16)
- pwrite (7)
-
raised
_ exception (11) - rake (11)
- rand (22)
- rdoc (11)
- read (22)
-
read
_ body (11) - readbyte (11)
- readchar (11)
- readline (33)
- readlines (22)
- recvmsg (11)
- reject (22)
- release (11)
-
renegotiation
_ cb= (11) - reopen (11)
-
request
_ get (22) -
request
_ post (22) -
respond
_ to? (11) -
return
_ value (11) - rewind (22)
-
rinda
/ rinda (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
rubygems
/ specification (11) - seek (11)
- select (11)
-
send
_ mail (11) - sender (11)
- sendmail (11)
- separator (11)
-
set
_ backtrace (11) -
set
_ dictionary (22) -
set
_ encoding _ by _ bom (5) -
set
_ get _ line _ procs (22) -
set
_ trace _ func (11) - setgid? (11)
- setuid? (11)
- sh (11)
- shift (33)
- size (11)
- slice (11)
- socket? (11)
-
sort
_ by (22) -
source
_ location (11) - start (33)
- stat (11)
- step (84)
- sticky? (11)
- strptime (22)
- sum (11)
- summarize (22)
-
summary
_ indent (11) -
summary
_ indent= (11) -
summary
_ width (11) -
summary
_ width= (11) -
super
_ method (10) - superclass (11)
- sync (11)
-
synthesize
_ file _ task (11) - sysseek (11)
- syswrite (11)
- tell (22)
- test (40)
- timeout (19)
-
to
_ a (11) -
to
_ enum (22) -
to
_ path (11) -
to
_ proc (5) -
to
_ s (44) - tracer (11)
- transaction (11)
- transfer (11)
- trap (22)
- truncate (11)
-
try
_ convert (11) - tsort (11)
-
tsort
_ each (11) -
unalias
_ command (6) - ungetc (11)
- unpack (11)
- upto (11)
- value (11)
- variables (11)
- ver (11)
-
verbose
_ flag (11) -
verbose
_ flag= (11) -
webrick
/ cgi (11) -
win32
/ registry (11) -
with
_ config (22) -
with
_ index (22) -
with
_ object (22) - wrap (44)
- write (11)
-
write
_ headers? (11) - yield (22)
- ~ (11)
- メソッド呼び出し(super・ブロック付き・yield) (11)
- リテラル (11)
- 制御構造 (11)
- 演算子式 (11)
検索結果
先頭5件
-
irb (26156.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロン......$ irb
irb(main):001: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......ブジェクトに
IRB::Context オブジェクトを渡して実行します。
これによってサブ irb の設定をまとめて設定することができます。
以下に例を示します。
$ irb
irb(main):001:0> IRB.conf[:IRB_RC] = lambda {|conf| conf.prompt_i = "> " }
=> #<Proc... -
Enumerator
:: ArithmeticSequence # end -> Numeric | nil (21302.0) -
末項(終端)を返します。
...末項(終端)を返します。
@see Enumerator::ArithmeticSequence#begin... -
Shell
:: Filter # |(filter) -> object (21254.0) -
パイプ結合を filter に対して行います。
...パイプ結合を filter に対して行います。
@param filter Shell::Filter オブジェクトを指定します。
@return filter を返します。
使用例
require 'shell'
Shell.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Sh......ell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc("-l")).to_s.chomp.to_i
puts (cat("/etc/passwd") | head("-n #{i}") | tail("-n 1")).to_s
i += 1
end
}... -
MatchData
# end(n) -> Integer | nil (18338.0) -
n 番目の部分文字列終端のオフセットを返します。
...nil を返します。
@param n 部分文字列を指定する数値。
@raise IndexError 範囲外の n を指定した場合に発生します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.end(0) # => 6
p $~.end(1) # => 3
p $~.end(2) # => 6
p $~.end(3) # => nil
p $~.end......(4) # => `end': index 4 out of matches (IndexError)
//}
@see MatchData#begin... -
TracePoint
# binding -> Binding | nil (15525.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...れた Binding オブジェクトを返します。
C で記述されたメソッドは binding を生成しないため、
:c_call および :c_return イベントに対しては nil を返すことに注意してください。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:......call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
TracePoint
# binding -> Binding (15424.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...発生したイベントによって生成された Binding オブジェクトを返します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
OpenSSL
:: SSL :: SSLSocket # pending -> Integer | nil (12401.0) -
OpenSSL内部のバッファが保持している、直ちに読み取り可能な データのバイト数を返します。
...OpenSSL内部のバッファが保持している、直ちに読み取り可能な
データのバイト数を返します。
ハンドシェイク開始前には nil を返します。... -
Pathname
# opendir {|dir| . . . } -> nil (12401.0) -
Dir.open(self.to_s, &block) と同じです。
...Dir.open(self.to_s, &block) と同じです。
@see Dir.open... -
ObjectSpace
. # define _ finalizer(obj) {|id| . . . } -> Array (12343.0) -
obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。
...ロックを指定した場合は、そのブロックがファイナライザになります。
obj の回収時にブロックは obj の ID (BasicObject#__id__)を引数とし
て実行されます。
しかし、後述の問題があるのでブロックでファイナライザを登録するの......回収時に obj の ID を引数として実行されます。
=== 使い方の注意
以下は、define_finalizer の使い方の悪い例です。
//emlist[悪い例][ruby]{
class Foo
def initialize
ObjectSpace.define_finalizer(self) {
puts "foo"
}
end
end
Foo.new
GC.start
//......file は、ファイナライザの使い方の
良い例になっています。これは、クラスのコンテキストで Proc を
生成することで上記の問題を回避しています。
//emlist[例][ruby]{
class Bar
def Bar.callback
proc {
puts "bar"
}
end
def ini... -
Kernel
$ $ INPUT _ LINE _ NUMBER -> Integer (12324.0) -
$. の別名
...$. の別名
1 e
2 f
3 g
4 h
5 i
# end of a.txt
require "English"
File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb
ruby sample.rb a.txt
#=> 5... -
Net
:: SMTP # send _ mail(mailsrc , from _ addr , *to _ addrs) -> () (12306.0) -
メールを送信します。
...メールを送信します。
mailsrc をメールとして送信します。
mailsrc は each イテレータを持つ
オブジェクトならなんでも構いません(たとえば String や File)。
from_domain は送り主のメールアドレス ('...@...'のかたち) 、
to_addrs に......で渡します。
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string,
'from@example.com',
'to1@example.net', 'to2@example.net'
}
sendmail は obsolete です。
@param mailsrc メールの内容
@par......少なくとも1個)
@raise IOError すでにセッションが終了している場合に発生します
@raise TimeoutError 接続がタイムアウトした場合に発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMT...