るりまサーチ

最速Rubyリファレンスマニュアル検索!
543件ヒット [1-100件を表示] (0.118秒)

別のキーワード

  1. _builtin to_c
  2. etc sc_2_c_bind
  3. etc sc_2_c_dev
  4. tracer display_c_call
  5. tracer display_c_call=

検索結果

<< 1 2 3 ... > >>

IRB::Context#main -> object (21202.0)

self に設定されたオブジェクトを返します。

...self に設定されたオブジェクトを返します。

@see cwws コマンド...

Rake::RDocTask#main -> String (21102.0)

メインとして使用されるファイル名を返します。

メインとして使用されるファイル名を返します。

Exception#backtrace_locations -> [Thread::Backtrace::Location] (9229.0)

バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。

...返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。

現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。

//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(mon...
...et_exception
return begin
yield
rescue => e
e
end
end

e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_exception'", "test.rb:15:in `<main>'"]
//}

@see Exception#backtrace...

TracePoint#instruction_sequence -> RubyVM::InstructionSequence (9207.0)

script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。

...script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。

//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval...
...("puts 'hello'")
end
//}

@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。...

BigDecimal#remainder(n) -> BigDecimal (9201.0)

self を n で割った余りを返します。

...//emlist[][ruby]{
require 'bigdecimal'
x = BigDecimal((2**100).to_s)
x.remainder(3).to_i # => 1
(-x).remainder(3).to_i # => -1
x.remainder(-3).to_i # => 1
(-x).remainder(-3).to_i # => -1
//}

戻り値は self と同じ符号になります。これは BigDecimal#% とは異な
る点に注...
...意してください。詳細は Numeric#%、
Numeric#remainder を参照して下さい。...

絞り込み条件を変える

Numeric#remainder(other) -> Numeric (9201.0)

self を other で割った余り r を返します。

...her).truncate がそれに相当します。

@param other 自身を割る数を指定します。

//emlist[例][ruby]{
p 13.remainder(4) #=> 1
p (11.5).remainder(3.5) #=> 1.0
p 13.remainder(-4) #=> 1
p (-13).remainder(4) #=> -1
p (-13).remainder(-4) #=> -1
p (-11).remainder(3.5)...
...#=> -0.5
//}

@see Numeric#divmod, Numeric#modulo...

Exception#set_backtrace(errinfo) -> nil | String | [String] (9125.0)

バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。

...定します。

//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
$!.backtrace # => ["/path/to/test.rb:5:in `rescue in <main>'", "/path/to/test.rb:2:in `<main>'"]
$!.set_backtrace(["dummy1", "dummy2"])
$!.backtrace # => ["dummy1", "dummy2"]
end
//}...

RDoc::Options#main_page -> String | nil (9118.0)

コマンドライン引数の --main オプションで指定したファイル名、クラス/モ ジュール名を返します。

...コマンドライン引数の --main オプションで指定したファイル名、クラス/モ
ジュール名を返します。

指定しなかった場合は nil を返します。...

RDoc::Options#main_page=(val) (9118.0)

コマンドライン引数の --main オプションと同様の指定を行います。

...コマンドライン引数の --main オプションと同様の指定を行います。

@param val 設定するファイル名、クラス/モジュール名を文字列で指定します。...
<< 1 2 3 ... > >>