495件ヒット
[1-100件を表示]
(0.044秒)
別のキーワード
種類
- 特異メソッド (269)
- インスタンスメソッド (111)
- 文書 (60)
- モジュール関数 (44)
- ライブラリ (11)
ライブラリ
クラス
- CSV (165)
-
Encoding
:: Converter (33) - Exception (7)
-
Gem
:: RemoteFetcher (11) - Regexp (22)
- Thread (32)
モジュール
-
CGI
:: QueryExtension :: Value (22) - Enumerable (22)
- Open3 (44)
- OpenURI (22)
- Rake (22)
-
Rake
:: TaskManager (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - application (11)
- application= (11)
- compile (11)
- filter (33)
- first (11)
- generate (11)
- instance (22)
-
last
_ description (11) -
last
_ description= (11) -
last
_ error (11) - new (44)
- open (44)
-
open
_ uri (22) -
open
_ uri _ or _ path (11) - parse (22)
-
pipeline
_ r (22) -
pipeline
_ rw (22) - read (11)
- readlines (11)
-
report
_ on _ exception (16) -
report
_ on _ exception= (16) - rss (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
slice
_ before (22)
検索結果
先頭5件
-
CGI
:: QueryExtension :: Value # last -> self (18101.0) -
@todo
@todo -
Rake
:: TaskManager # last _ description=(description) (12319.0) -
最新の詳細説明をセットします。
...の記載例とする
task default: :test_rake_app1
desc "test1"
task :test_rake_app1 do |task|
task.application.last_description # => "test2"
task.application.last_description = "test3"
task.application.last_description # => "test3"
end
desc "test2"
task :test_rake_app2 do |task|
end
//}... -
Rake
:: TaskManager # last _ description -> String (9208.0) -
Rakefile 内の最新の詳細説明を追跡するためのメソッドです。
...詳細説明を追跡するためのメソッドです。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app1
desc "test1"
task :test_rake_app1 do |task|
p task.application.last_description # => "test2"
end
desc "test2"
task :test_rake_app2 do |task|
end
//}... -
Encoding
:: Converter # last _ error -> Exception | nil (6213.0) -
直前に変換器で発生した例外に相当する例外オブジェクトを返します。 直前の変換で例外が発生していない場合は nil を返します。
...859-1")
p ec.primitive_convert(src="\xf1abcd", dst="") #=> :invalid_byte_sequence
p ec.last_error #=> #<Encoding::InvalidByteSequenceError: "\xF1" followed by "a" on UTF-8>
p ec.primitive_convert(src, dst, nil, 1) #=> :destination_buffer_full
p ec.last_error #=> nil
//}... -
Rake
. application -> Rake :: Application (6212.0) -
現在の Rake アプリケーションを返します。
...re 'pp'
task default: :test_rake_app
task :test_rake_app do
pp Rake.application
end
# => #<Rake::Application:0x31b0f18
# @default_loader=#<Rake::DefaultLoader:0x31b0c78>,
# @imported=[],
# @last_description=nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x31b0c18>,
#.......rf"=>#<Rake::DefaultLoader:0x31b0b88>,
# ".rake"=>#<Rake::DefaultLoader:0x31b0b10>},
# @name="rake",
# @options=#<OpenStruct rakelib=["rakelib"], trace_output=#<IO:<STDERR>>>,
# @original_dir="/path/to/dir",
# @pending_imports=[],
# @rakefile="rakefile",
# @rakefiles=[... -
Rake
. application=(app) (6112.0) -
現在の Rake アプリケーションをセットします。
...tion のインスタンスを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'pp'
task default: :test_rake_app
task :test_rake_app do
app = Rake::Application.new
app.tty_output = true
Rake.application = app
pp Rake.application
end
# => #<Rake::Application......# @imported=[],
# @last_description=nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x00005624e6c30bc0>,
# ".rf"=>#<Rake::DefaultLoader:0x00005624e6c30b48>,
# ".rake"=>#<Rake::DefaultLoader:0x00005624e6c30a80>},
# @name="rake",
# @options=
# #<OpenStruct al......prereqs=false, show_task_pattern=nil, show_tasks=nil, silent=false, suppress_backtrace_pattern=nil, thread_pool_size=20, trace=false, trace_output=#<IO:<STDERR>>, trace_rules=false>,
# @original_dir="/path/to/dir",
# @pending_imports=[],
# @rakefile=nil,
# @rakefiles=["rakefile", "Ra... -
Thread
# report _ on _ exception -> bool (6106.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...eport_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a......):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 # => #<Threa......d:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
Thread
# report _ on _ exception=(newstate) (6106.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...eport_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a......):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 # => #<Threa......d:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception... -
Thread
. report _ on _ exception -> bool (6106.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: from -e:1:in `times'
これによってスレッドの......や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。しかし、この場合、例外をハンドルするのが遅れたり、親スレ......終了を待つことができなかったりするかもしれません。
スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true... -
Thread
. report _ on _ exception=(newstate) (6106.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: from -e:1:in `times'
これによってスレッドの......や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。しかし、この場合、例外をハンドルするのが遅れたり、親スレ......終了を待つことができなかったりするかもしれません。
スレッドごとに設定する方法は Thread#report_on_exception= を参照してください。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true... -
Exception
# full _ message(highlight: true , order: :bottom) -> String (3012.0) -
例外の整形された文字列を返します。
...は Exception.to_tty? の返り値と同じです。
@param order :top か :bottom で指定する必要があります。
バックトレースの一番奥がエラーメッセージの上(top)か下(bottom)かを指定します。
デフォルト値は Exception.to_tty?......e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
$stderr = $stdout
p e.full_message # => "test.rb:2:in `<main>': test (RuntimeError)\n"
$stderr = STDERR
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<m......ain>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
end
//}
@see Exception.to_tty?...