Bug #6160

'\\'.delete('\\') raise ArgumentError: empty string

Added by Kazuhiro NISHIYAMA over 3 years ago. Updated over 3 years ago.

[ruby-dev:45374]
Status:Closed
Priority:Normal
Assignee:Kazuhiro NISHIYAMA
ruby -v:ruby 2.0.0dev (2012-03-17 trunk 35072) [x86_64-linux] Backport:

Description

r35069 の変更の影響でクリーンビルドすると
../tool/transcode-tblgen.rb:758:in `delete': empty string (ArgumentError)
で止まります。

再現条件を絞り込んだところ '\'.delete('\') で ArgumentError になりました。

Associated revisions

Revision 35073
Added by kazu over 3 years ago

  • string.c (trnext): fix bug with string ending with '\'.
    [Bug #6160]

  • test/ruby/test_string.rb (TestString#test_delete): test for
    above.

Revision 35073
Added by kazu over 3 years ago

  • string.c (trnext): fix bug with string ending with '\'.
    [Bug #6160]

  • test/ruby/test_string.rb (TestString#test_delete): test for
    above.

History

#1 Updated by Kazuhiro NISHIYAMA over 3 years ago

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

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


  • string.c (trnext): fix bug with string ending with '\'.
    [Bug #6160]

  • test/ruby/test_string.rb (TestString#test_delete): test for
    above.

Also available in: Atom PDF