Project

General

Profile

Actions

Bug #3347

closed

Dir.tmpdirが、filesystem encodingを返さない

Added by hasimo (Tohru Hashimoto) almost 14 years ago. Updated about 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2010-05-25 revision 28010) [x86_64-linux]
Backport:
[ruby-dev:41429]

Description

=begin
Tmpfile.newのbasenameをASCII以外の文字を渡すとエラーになるようです。

% ruby -ve "Tempfile.new('ほげ')" -rtempfile
ruby 1.9.2dev (2010-05-25 revision 28010) [x86_64-linux]
/home/sulky/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/tmpdir.rb:131:in expand_path': incompatible character encodings: UTF-8 and US-ASCII (Encoding::CompatibilityError) from /home/sulky/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/tmpdir.rb:131:in create'
from /home/sulky/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/tempfile.rb:134:in initialize' from -e:1:in new'
from -e:1:in `'

調べたところ、Dir.tmpdirの中で、[ENV['TMPDIR'], ENV['TMP'], ENV['TEMP']がない場合/tmpとなりソースコードのエンコーディングになってるためと思われます。
=end

Actions #1

Updated by naruse (Yui NARUSE) almost 14 years ago

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

=begin
This issue was solved with changeset r28039.
Tohru, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0