Project

General

Profile

Actions

Bug #1924

closed

マルチバイト文字を含んだパス内で ruby をビルドすると make install で失敗する

Added by mrkn (Kenta Murata) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-08-11 trunk 24495) [i686-linux]
Backport:
[ruby-dev:39066]

Description

=begin
マルチバイト文字を含んだパス内で ruby をビルドすると make install で失敗します。

$ make install
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"
/home/muraken/src/るびぃ/ruby.git/lib/tempfile.rb:7:in require': /home/muraken/src/るびぃ/ruby.git/lib/delegate.rb:140: invalid multibyte character: /\A\/home\/muraken\/src\/るびぃ\/ruby.git\/lib\/delegate.rb:\d+:in method_missing'\z/ (SyntaxError)
from /home/muraken/src/るびぃ/ruby.git/lib/tempfile.rb:7:in <top (required)>' from ./tool/rbinstall.rb:15:in require'
from ./tool/rbinstall.rb:15:in `'
make: *** [do-install-nodoc] エラー 1
$ pwd
/home/muraken/src/るびぃ/ruby.git

マルチバイト文字を含んだパスにインストールされた ruby でも同じ現象が発生します。

$ ~/る/bin/ruby -v -rdelegate -e ''
ruby 1.9.2dev (2009-08-11 trunk 24495) [i686-linux]
-e:0:in require': /home/muraken/る/lib/ruby/1.9.1/delegate.rb:140: invalid multibyte character: /\A\/home\/muraken\/る\/lib\/ruby\/1.9.1\/delegate.rb:\d+:in method_missing'\z/ (SyntaxError)

以下の変更で治ります。

diff --git a/lib/delegate.rb b/lib/delegate.rb
index 5fc0caf..d0b732a 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -137,7 +137,7 @@ class Delegator
target.send(m, *args, &block)
end
rescue Exception

  •  $@.delete_if{|s| %r"\A#{__FILE__}:\d+:in `method_missing'\z"o =~ s}
    
  •  $@.delete_if{|s| %r"\A#{Regexp.quote(__FILE__)}:\d+:in `method_missing'\z"o =~ s}
     ::Kernel::raise
    
    end
    end
    =end
Actions #1

Updated by matz (Yukihiro Matsumoto) over 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r24531.
=end

Actions

Also available in: Atom PDF

Like0
Like0