Project

General

Profile

This project is closed and read-only.

Actions

Backport #4118

closed

ruby -x で実行すると行がずれる

Backport #4118: ruby -x で実行すると行がずれる

Added by metanest (Makoto Kishimoto) almost 16 years ago. Updated over 15 years ago.

Status:
Closed
[ruby-dev:42680]

Description

=begin
以下のように、

$ cat -n hoge.rb
1 #!/bin/sh
2 exec ruby19 -x "$0" "$@"
3 #!ruby
4 raise
$ ruby19 hoge.rb
hoge.rb:4:in <main>': unhandled exception $ ./hoge.rb ./hoge.rb:5:in

': unhandled exception

-x オプションを使って実行すると、エラーメッセージで表示される行が1行大きいものになります。
ruby 1.8 では発生しません。
=end

Actions

Also available in: PDF Atom