238件ヒット
[201-238件を表示]
(0.221秒)
ライブラリ
- ビルトイン (105)
- bigdecimal (24)
- csv (12)
- logger (1)
- pathname (12)
- rake (12)
-
rubygems
/ specification (24) - scanf (6)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - stringio (12)
- strscan (12)
クラス
- BigDecimal (24)
- CSV (12)
- File (12)
- Float (12)
-
Gem
:: Specification (24) - Integer (12)
-
Logger
:: Application (1) - Numeric (12)
- Pathname (12)
-
Rake
:: Application (12) - Rational (12)
-
Scanf
:: FormatString (6) - Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - StringIO (12)
- StringScanner (12)
- Thread (45)
キーワード
-
add
_ runtime _ dependency (12) -
backtrace
_ locations (24) -
matched
_ size (12) - prune (6)
-
report
_ on _ exception= (9) -
runtime
_ dependencies (12) - start (1)
- status (12)
- truncate (138)
検索結果
先頭5件
-
StringScanner
# matched _ size -> Integer | nil (6125.0) -
前回マッチした部分文字列の長さを返します。 前回マッチに失敗していたら nil を返します。
...//emlist[][ruby]{
require 'strscan'
def run(encode)
utf8 = "\u{308B 3073 3044}" # るびい
s = StringScanner.new(utf8.encode(encode))
s.scan(/#{"\u{308B}".encode(encode)}/)
s.matched_size
end
p run("UTF-8") #=> 3
p run("EUC-JP") #=> 2
p run("Shift_Jis") #=> 2
//}
//emlist[例][r......uby]{
require 'strscan'
s = StringScanner.new('test string')
s.matched_size # => nil
s.scan(/\w+/) # => "test"
s.matched_size # => 4
s.scan(/\w+/) # => nil
s.matched_size # => nil
//}... -
Thread
# status -> String | false | nil (6123.0) -
生きているスレッドの状態を文字列 "run"、"sleep", "aborting" のいず れかで返します。正常終了したスレッドに対して false、例外によ り終了したスレッドに対して nil を返します。
...生きているスレッドの状態を文字列 "run"、"sleep", "aborting" のいず
れかで返します。正常終了したスレッドに対して false、例外によ
り終了したスレッドに対して nil を返します。
Thread#alive? が真を返すなら、このメソッドも......hread.new { sleep }
d.kill #=> #<Thread:0x401b3678 aborting>
a.status #=> nil
b.status #=> "sleep"
c.status #=> false
d.status #=> "aborting"
Thread.current.status #=> "run"
@see Thread#alive?, Thread#stop?... -
Gem
:: Specification # add _ runtime _ dependency(gem , *requirements) -> [Gem :: Dependency] (6101.0) -
この gem の RUNTIME 依存性を追加します。 実行時に必要となる gem を指定します。
...この gem の RUNTIME 依存性を追加します。
実行時に必要となる gem を指定します。
//emlist[][ruby]{
# https://github.com/rurema/bitclust/blob/v1.2.3/bitclust-core.gemspec#L25
s.add_runtime_dependency "progressbar", ">= 1.9.0", "< 2.0"
//}
@param gem 依存する gem の......名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。
@see Gem::Specification#add_development_dependency, Gem::Dependency... -
Logger
:: Application # start -> () (3013.0) -
アプリケーションをスタートさせます。
...アプリケーションをスタートさせます。
@return run メソッドの返値を返します。
@raise RuntimeError サブクラスで run メソッドを定義していない場合に発生します。... -
Thread
# report _ on _ exception=(newstate) (119.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Thread:0x0000......8@(irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #...