10件ヒット
[1-10件を表示]
(0.102秒)
検索結果
-
Exception
# full _ message(highlight: true , order: :bottom) -> String (3313.0) -
例外の整形された文字列を返します。
...して実際に、キーワード引数 highlight と order は 2.5.1 で追加されました。
@param highlight エスケープシーケンスによる文字装飾をつけるかどうかを指定します。
デフォルト値は Exception.to_tty? の返り値と同じです。......デフォルト値は Exception.to_tty? が真なら :bottom で偽なら :top です。
//emlist[例][ruby]{
begin
raise "test"
rescue => e
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
$stder......r = $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 `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
end
//}
@see Exception.to_tty?......プシーケンスによる文字装飾がついています。
@param highlight エスケープシーケンスによる文字装飾をつけるかどうかを指定します。
デフォルト値は Exception.to_tty? の返り値と同じです。
@param order :top か :bottom... -
Rubyの起動 (66.0)
-
Rubyの起動 * cmd_option * shebang
...Rubyの起動
* cmd_option
* shebang
Rubyインタプリタの起動は以下の書式のコマンドラインにより行います。
ruby [ option ...] [ -- ] [ programfile ] [ argument ...]
ここで、option は後述のcmd_option
のいずれかを指定します。-- は、オプシ......を明示するため
に使用できます。programfile は、Ruby スクリプトを記述したファイ
ルです。これを省略したり`-' を指定した場合には標準入力を Ruby ス
クリプトとみなします。
programfile が `#!' で始まるファイルである場合、......ing.default_internal'
#<Encoding:UTF-8>
#<Encoding:EUC-JP>
//}
: --enable feature
指定した feature を有効にします。以下のいずれかを指定できます。
//emlist{
* gems rubygems (無効にするのはデバッグ専用、default: enabled)
* error_highlight...