Project

General

Profile

Bug #10242

Backport r47591 (Pathname#relative_path_from crash)

Added by nagachika (Tomoyuki Chikanaga) over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
-
[ruby-dev:48546]

Description

r47591 で修正された pathname.rb の当該箇所は 2.0.0 と 2.1 でも同様で、Encodingが異なる文字列でString#casecmpがnilを返す点も同じなので同様の問題があると思います。

バックポート管理用チケットなのでClosed状態で作成します。

Associated revisions

Revision e54ec54d
Added by nagachika (Tomoyuki Chikanaga) over 5 years ago

merge revision(s) r47591: [Backport #10242]

    * ext/pathname/lib/pathname.rb (SAME_PATHS):
      Pathname#relative_path_from uses String#casecmp to compare strings
      on case-insensitive filesystem platforms (e.g., Windows). This can
      return nil for strings with different encodings, and the code
      previously assumed that it always returned a Fixnum.  [Fix GH-713]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@47596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 47596
Added by nagachika (Tomoyuki Chikanaga) over 5 years ago

merge revision(s) r47591: [Backport #10242]

* ext/pathname/lib/pathname.rb (SAME_PATHS):
  Pathname#relative_path_from uses String#casecmp to compare strings
  on case-insensitive filesystem platforms (e.g., Windows). This can
  return nil for strings with different encodings, and the code
  previously assumed that it always returned a Fixnum.  [Fix GH-713]

Revision 95285e34
Added by usa (Usaku NAKAMURA) about 5 years ago

merge revision(s) 47591: [Backport #10242]

    * ext/pathname/lib/pathname.rb (SAME_PATHS):
      Pathname#relative_path_from uses String#casecmp to compare strings
      on case-insensitive filesystem platforms (e.g., Windows). This can
      return nil for strings with different encodings, and the code
      previously assumed that it always returned a Fixnum.  [Fix GH-713]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 47611
Added by usa (Usaku NAKAMURA) about 5 years ago

merge revision(s) 47591: [Backport #10242]

* ext/pathname/lib/pathname.rb (SAME_PATHS):
  Pathname#relative_path_from uses String#casecmp to compare strings
  on case-insensitive filesystem platforms (e.g., Windows). This can
  return nil for strings with different encodings, and the code
  previously assumed that it always returned a Fixnum.  [Fix GH-713]

History

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

Backported into ruby_2_1 branch at r47596.

Updated by usa (Usaku NAKAMURA) about 5 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE

backported into ruby_2_0_0 at r47611.

Also available in: Atom PDF