るりまサーチ

最速Rubyリファレンスマニュアル検索!
495件ヒット [1-100件を表示] (0.044秒)
トップページ > クエリ:io[x] > クエリ:last[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

検索結果

<< 1 2 3 ... > >>

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?...
<< 1 2 3 ... > >>