Project

General

Profile

Actions

Backport #5533

closed

Pathname's raising "invalid sequence"

Added by shyouhei (Shyouhei Urabe) over 12 years ago. Updated about 12 years ago.

Status:
Closed
[ruby-dev:44757]

Description

どのような経緯か存じ上げませんが1.9.3以降(trunkも)のpathnameで以下のようなスクリプトが例外になるのはなぜですか? 1.9.2までは意図したとおりに動いていました。

https://gist.github.com/1330056#file_bug.rb


Related issues 3 (0 open3 closed)

Related to Backport193 - Backport #5601: Ruby 1.9.3 fails to compile in directories with accent in their namesClosed11/09/2011Actions
Related to Ruby master - Bug #5447: Rails can't create a new app when a folder with accented letter is in the pathClosed10/14/2011Actions
Related to Backport193 - Backport #5911: File.expand_path produces malfunction string (it doesn't change on #encode)Closed01/19/2012Actions

Updated by naruse (Yui NARUSE) over 12 years ago

r33603 で修正しました。
File.expand_path 時の coderange 設定ミスのようです。
./ruby -e'p File.expand_path("あ").ascii_only?' #=> true なのが誤り

ご提示のスクリプトの場合、s4.force_encoding(s4.encoding) などで coderange の再スキャンが走るようにすると回避できます。

Actions #2

Updated by naruse (Yui NARUSE) over 12 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport193
  • Category deleted (M17N)
  • Assignee changed from naruse (Yui NARUSE) to yugui (Yuki Sonoda)
  • Target version deleted (1.9.3)

Updated by kouji (Kouji Takao) over 12 years ago

高尾です。

コメントだけになってしましますが、

On 2011/11/01, at 1:18, Yui NARUSE wrote:

r33603 で修正しました。
File.expand_path 時の coderange 設定ミスのようです。
./ruby -e'p File.expand_path("あ").ascii_only?' #=> true なのが誤り

trunkにコミットされていることを確認しました。
これは1.9.3-p0にバックポートされますでしょうか。
(されるような気がしています。)

また、Redmineにて1.9.3へのバックポート対象を管理できたほうがいいかもしれないと思いました。

Actions #4

Updated by naruse (Yui NARUSE) over 12 years ago

Backport93トラッカーにあるというのは、1.9.3へのバックポート対象であるという意味です

Updated by kouji (Kouji Takao) over 12 years ago

おっと、失礼しました。
トラッカーの変更はメールで通知されないのですね。
Redmineのほうはきちんと見ていませんでした。

Actions #6

Updated by naruse (Yui NARUSE) about 12 years ago

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

This issue was solved with changeset r34441.
Shyouhei, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 33603: [Backport #5533] [Backport #5911]

* file.c (file_expand_path): reset coderange after expanding path.
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0