別のキーワード
ライブラリ
クラス
- Array (77)
- BasicSocket (11)
- Dir (22)
-
Enumerator
:: ArithmeticSequence (11) - Exception (33)
-
File
:: Stat (11) - IO (11)
- LoadError (11)
- MatchData (44)
- OptionParser (44)
- PrettyPrint (11)
- Random (33)
- Regexp (33)
- Shell (24)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - Socket (22)
- String (132)
- SystemCallError (11)
- Thread (11)
-
Thread
:: Queue (33) -
Thread
:: SizedQueue (33) - TracePoint (22)
- WIN32OLE (22)
-
Zlib
:: GzipReader (242) -
Zlib
:: Inflate (11)
キーワード
-
$ ERROR _ INFO (11) -
$ ERROR _ POSITION (11) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - == (11)
- =~ (11)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
- Ruby用語集 (11)
- [] (128)
- accept (22)
- at (11)
- cause (11)
- deq (22)
- each (22)
-
each
_ byte (22) -
each
_ line (22) - end (17)
- eof (11)
- eof? (11)
- errno (11)
- fetch (66)
- format (11)
- getc (11)
- getoptlong (11)
- getpeereid (11)
- gets (11)
- irb (11)
-
last
_ match (22) - lineno (11)
- logger (11)
- mktmpdir (22)
- new (22)
- offset (22)
-
ole
_ get _ methods (11) -
ole
_ query _ interface (11) - open (44)
- open! (11)
- path (11)
- pop (22)
-
raised
_ exception (11) - rand (33)
- rdoc (11)
- read (11)
- readbyte (11)
- readchar (11)
- readline (22)
- readlines (11)
- reject (22)
- reopen (11)
- rewind (11)
- rss (11)
-
ruby 1
. 6 feature (11) -
set
_ backtrace (11) -
set
_ dictionary (11) - shift (22)
- slice (66)
- sticky? (11)
-
tcp
_ server _ loop (22) - test (18)
- timeout (19)
- trap (22)
- tsort (11)
-
unalias
_ command (6) -
undef
_ system _ command (6) - ungetc (11)
- wrap (22)
- クラス/メソッドの定義 (11)
- 制御構造 (11)
検索結果
先頭5件
-
MatchData
# begin(n) -> Integer | nil (18338.0) -
n 番目の部分文字列先頭のオフセットを返します。
...範囲外の n を指定した場合に発生します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.begin(0) # => 0
p $~.begin(1) # => 0
p $~.begin(2) # => 3
p $~.begin(3) # => nil
p $~.begin(4) # => `begin': index 4 out of matches (IndexError)
//}
@see MatchData#end... -
Enumerator
:: ArithmeticSequence # begin -> Numeric | nil (18302.0) -
初項 (始端) を返します。
初項 (始端) を返します。
@see Enumerator::ArithmeticSequence#end -
ruby 1
. 6 feature (5370.0) -
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) -> stable-snapshot
: 2003-01-22: errno
EAGAIN と EWOULDBLOCK が同じ値の......> ruby 1.6.7 (2002-03-01) [i586-linux]
Errno::EAGAIN
Errno::EWOULDBLOCK
=> ruby 1.6.8 (2002-12-24) [i586-linux]
Errno::EAGAIN
-:2: uninitialized constant EWOULDBLOCK at Errno (NameError)
=> ruby 1.6.8 (2003-02-13) [i586-linux]......た。((<ruby-dev:13194>))
: Ctrl-C (Interrupt)が効かなくなる
((<ruby-dev:13195>))
th1 = Thread.start {
begin
Thread.stop
ensure
Thread.pass
Thread.stop
end
}
sleep 1
(確認できる限りでは ruby-1.7.0 (2001-05-17) 以降で... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (4038.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...作はなくなりました)
$defout や $deferr に代入を行うと警告がでます。
(注:1.6 に $deferr はありません)
((<ruby-dev:20961>))
$stdin にオブジェクトを代入すると標準入力からの入力メソッド(gets 等)
はそのオブジェクトにメソ......に変更されました。((<ruby-dev:20358>))
* Proc.new およびブロック引数で与えられる Proc は
引数チェックがゆるい。break が例外になる。
Proc.new {|a,b,c| p [a,b,c]}.call(1,2)
=> -:1: wrong # of arguments (2 for 3) (Ar......((<ruby-dev:16776>))
: ((<"rescue/ensure on begin .. end while"|制御構造/while 修飾子>)) [compat]
rescue/ensure を持つ begin 式も while/until 修飾できるようになりまし
た。
以前は、rescue/ensure を持つ while/until 修飾式は、通常の begin 式に
wh... -
rss (642.0)
-
RSS を扱うためのライブラリです。
...す。
=== 参考
* RSS 0.91 http://backend.userland.com/rss091
* RSS 1.0 http://purl.org/rss/1.0/spec
* RSS 2.0 http://www.rssboard.org/rss-specification
* Atom 1.0 https://www.ietf.org/rfc/rfc4287.txt
=== 注意
RSS ParserはRSS 0.9x/1.0/2.0, Atom 1.0 をサポートしています......はない RSS だった
場合はバリデーション無しでパースするには以下のように書きます。
require 'rss'
rss = nil
begin
rss = RSS::Parser.parse(rss_source)
rescue RSS::InvalidRSSError
rss = RSS::Parser.parse(rss_source, false)
end
これは rss_source......作成するには
RSS Makerが便利です.
以下のように使います.
require "rss"
rss = RSS::Maker.make("バージョン") do |maker|
maker.XXX = YYY
...
end
===== シンプルなRSS
例えば,
* http://example.com/にある
* Example Siteという説明文を... -
Shell
# [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (412.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p... -
Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (412.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p... -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (412.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p... -
Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (412.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p... -
Shell
:: Filter # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (412.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p... -
Shell
:: Filter # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (412.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p... -
Syslog
. # open!(ident= $ 0 , options=Syslog :: LOG _ PID|Syslog :: LOG _ CONS , facility=Syslog :: LOG _ USER) { |syslog| . . . } -> self (324.0) -
開いていた syslog を最初にクローズする点を除いてSyslog.#open と同じです。
...am options Syslog.open や Syslog.log の動作を制御するフラグを指定します。
指定しない場合は、Syslog::LOG_PID|Syslog::LOG_CONSの値が使われ
ます。使用できる値はSyslog::Constants を参照してください。
@param facility ロ......ng in %d seconds!", 100)
begin
Syslog.open!("syslogtest2")
Syslog.log(Syslog::LOG_WARNING, "the sky is falling in %d seconds!", 200)
rescue RuntimeError => err
# RuntimeError は発生しない。
puts err
end
File.foreach('/var/log/system.log'){|line|
print line if line... -
Syslog
. # reopen(ident= $ 0 , options=Syslog :: LOG _ PID|Syslog :: LOG _ CONS , facility=Syslog :: LOG _ USER) { |syslog| . . . } -> self (324.0) -
開いていた syslog を最初にクローズする点を除いてSyslog.#open と同じです。
...am options Syslog.open や Syslog.log の動作を制御するフラグを指定します。
指定しない場合は、Syslog::LOG_PID|Syslog::LOG_CONSの値が使われ
ます。使用できる値はSyslog::Constants を参照してください。
@param facility ロ......ng in %d seconds!", 100)
begin
Syslog.open!("syslogtest2")
Syslog.log(Syslog::LOG_WARNING, "the sky is falling in %d seconds!", 200)
rescue RuntimeError => err
# RuntimeError は発生しない。
puts err
end
File.foreach('/var/log/system.log'){|line|
print line if line...