ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:49704] [Ruby trunk Bug#12540] test failures when SHARABLE_MIDDLE_SUBSTRING=1
       [not found] <redmine.issue-12540.20160702062327@ruby-lang.org>
@ 2016-07-02  6:23 ` zn
  0 siblings, 0 replies; only message in thread
From: zn @ 2016-07-02  6:23 UTC (permalink / raw
  To: ruby-dev

Issue #12540 has been reported by Kazuhiro NISHIYAMA.

----------------------------------------
Bug #12540: test failures when SHARABLE_MIDDLE_SUBSTRING=1
https://bugs.ruby-lang.org/issues/12540

* Author: Kazuhiro NISHIYAMA
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.4.0dev (2016-07-02 trunk 55562) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
SHARABLE_MIDDLE_SUBSTRING=1 でビルドすると Test_StringCStr#test_wchar_lstrip!,Test_StringCStr#test_wchar_rstrip! が失敗します。

~~~
[16604/16757] Test_StringCStr#test_wchar_lstrip! = 0.00 s
  3) Failure:
Test_StringCStr#test_wchar_lstrip! [/home/vagrant/ruby/test/-ext-/string/test_cstr.rb:81]:
Expected {#<Encoding:UTF-16BE>=>"a",
 #<Encoding:UTF-16LE>=>"a",
 #<Encoding:UTF-32BE>=>"a",
 #<Encoding:UTF-32LE>=>"a"} to be empty.

[16606/16757] Test_StringCStr#test_wchar_rstrip! = 0.00 s
  4) Failure:
Test_StringCStr#test_wchar_rstrip! [/home/vagrant/ruby/test/-ext-/string/test_cstr.rb:85]:
Expected {#<Encoding:UTF-16BE>=>" ",
 #<Encoding:UTF-16LE>=>" ",
 #<Encoding:UTF-32BE>=>" ",
 #<Encoding:UTF-32LE>=>" "} to be empty.
~~~

原因を調べてみたところ、lstrip!,rstrip! だけ !SHARABLE_MIDDLE_SUBSTRING で TERM_FILL をくくっているからのようでした。

調べていて思ったのですが、個別に TERM_FILL を呼ぶかどうかを分岐するよりも、 SHARABLE_MIDDLE_SUBSTRING の値によって TERM_FILL 自体の定義を変更するようにした方が良いのではないでしょうか?



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-02  5:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-12540.20160702062327@ruby-lang.org>
2016-07-02  6:23 ` [ruby-dev:49704] [Ruby trunk Bug#12540] test failures when SHARABLE_MIDDLE_SUBSTRING=1 zn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).