[#79914] [Ruby trunk Bug#13282] opt_str_freeze does not always dedupe — normalperson@...
Issue #13282 has been reported by Eric Wong.
4 messages
2017/03/05
[#80140] [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus) — shyouhei@...
Issue #13295 has been updated by shyouhei (Shyouhei Urabe).
5 messages
2017/03/13
[#80362] Re: [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus)
— Eric Wong <normalperson@...>
2017/03/26
shyouhei@ruby-lang.org wrote:
[#80368] Re: [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus)
— SASADA Koichi <ko1@...>
2017/03/27
On 2017/03/26 15:16, Eric Wong wrote:
[#80205] Re: [ruby-cvs:65166] duerst:r58000 (trunk): clarifiy 'codepoint' in documentation of String#each_codepoint — Eric Wong <normalperson@...>
duerst@ruby-lang.org wrote:
4 messages
2017/03/17
[#80213] Re: [ruby-cvs:65166] duerst:r58000 (trunk): clarifiy 'codepoint' in documentation of String#each_codepoint
— Martin J. Dürst <duerst@...>
2017/03/17
Hello Eric,
[#80290] [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch — normalperson@...
Issue #13355 has been reported by normalperson (Eric Wong).
4 messages
2017/03/23
[#80410] Re: [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch
— Eric Wong <normalperson@...>
2017/03/27
normalperson@yhbt.net wrote:
[#80415] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
5 messages
2017/03/28
[#80488] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
4 messages
2017/03/29
[ruby-core:80117] [Ruby trunk Bug#13269][Assigned] test/readline/test_readline.rb and mingw
From:
shyouhei@...
Date:
2017-03-13 08:56:09 UTC
List:
ruby-core #80117
Issue #13269 has been updated by Shyouhei Urabe.
Status changed from Open to Assigned
Assignee set to Nobuyoshi Nakada
----------------------------------------
Bug #13269: test/readline/test_readline.rb and mingw
https://bugs.ruby-lang.org/issues/13269#change-63543
* Author: Greg L
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Target version:
* ruby -v: ruby 2.5.0dev (2017-03-02 trunk 57755) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
When running test-all on a mingw build, [`test_readline.rb`](https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb) generates failures and errors. Several of the errors are due to the `with_temp_stdio` method in `test_readline.rb`. It also leaves several undeleted files in the temp dir.
Current link is: [TestReadline#with_temp_stdio](https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L580-L586)
The current code is:
```ruby
def with_temp_stdio
Tempfile.create("test_readline_stdin") {|stdin|
Tempfile.create("test_readline_stdout") {|stdout|
yield stdin, stdout
}
}
end
```
Replacing it with the following solved the problems.
```ruby
def with_temp_stdio
stdin = Tempfile.new("test_readline_stdin")
stdout = Tempfile.new("test_readline_stdout")
yield stdin, stdout
if stdout
stdout.closed? ? stdout.unlink : stdout.close!
end
if stdin
stdin.closed? ? stdin.unlink : stdin.close!
end
end
```
I can only test on Windows, but I assume the changed code would work on other os's. If someone could test it, I'd submit a PR. Maybe the code in `Tempfile::Remover` is really where the change should occur, but I haven't looked at that.
After this update, I only had one failure and three errors. Text below.
Odd thing for two errors it that they report `NoMethodError: undefined method assert_separately`, but the highlighted line is `return if assert_under_utf8`. I didn't do an exhaustive search, but I can't find a reference to that function. But, I'm pulling the test files out of ruby and running separately...
```
Failure: test_input_metachar(TestReadline)
D:/r_test/Readline/test_readline.rb:420:in `test_input_metachar'
417: wo = w.dup
418: wo.write("\C-re\ef\n")
419: end
=> 420: assert_equal("hello", line, bug6601)
421: ensure
422: wo.close
423: Readline.delete_text
[ruby-core:45682]
<"hello">(UTF-8) expected but was
<"hfello">(IBM437)
diff:
? hfello
? Encoding: UTF-8
? IBM437
====================================================================================================================================================
Error: test_input_metachar_multibyte(TestReadline):
NoMethodError: undefined method `assert_separately' for #<TestReadline:0x00000003bcfef0>
Did you mean? assert_empty
D:/r_test/Readline/test_readline.rb:618:in `assert_under_utf8'
D:/r_test/Readline/test_readline.rb:429:in `test_input_metachar_multibyte'
426:
427: def test_input_metachar_multibyte
428: unless Encoding.find("locale") == Encoding::UTF_8
=> 429: return if assert_under_utf8
430: skip 'this test needs UTF-8 locale'
431: end
432: bug6602 = '[ruby-core:45683]'
====================================================================================================================================================
Error: test_refresh_line(TestReadline):
NoMethodError: undefined method `assert_ruby_status' for #<TestReadline:0x00000003bcf6f8>
Did you mean? assert_raises
D:/r_test/Readline/test_readline.rb:459:in `block (2 levels) in test_refresh_line'
456: bug6232 = '[ruby-core:43957] [Bug #6232] refresh_line after set_screen_size'
457: with_temp_stdio do |stdin, stdout|
458: replace_stdio(stdin.path, stdout.path) do
=> 459: assert_ruby_status(%w[-rreadline -], <<-'end;', bug6232)
460: Readline.set_screen_size(40, 80)
461: Readline.refresh_line
462: end;
D:/r_test/Readline/test_readline.rb:567:in `block (2 levels) in replace_stdio'
D:/r_test/Readline/test_readline.rb:557:in `open'
D:/r_test/Readline/test_readline.rb:557:in `block in replace_stdio'
D:/r_test/Readline/test_readline.rb:556:in `open'
D:/r_test/Readline/test_readline.rb:556:in `replace_stdio'
D:/r_test/Readline/test_readline.rb:458:in `block in test_refresh_line'
D:/r_test/Readline/test_readline.rb:583:in `with_temp_stdio'
D:/r_test/Readline/test_readline.rb:457:in `test_refresh_line'
====================================================================================================================================================
Error: test_using_quoting_detection_proc_with_multibyte_input(TestReadline):
NoMethodError: undefined method `assert_separately' for #<TestReadline:0x00000003bcf2c0>
Did you mean? assert_empty
D:/r_test/Readline/test_readline.rb:618:in `assert_under_utf8'
D:/r_test/Readline/test_readline.rb:517:in `test_using_quoting_detection_proc_with_multibyte_input'
514: saved_completer_word_break_characters = Readline.completer_word_break_characters
515: return unless Readline.respond_to?(:quoting_detection_proc=)
516: unless Encoding.find("locale") == Encoding::UTF_8
=> 517: return if assert_under_utf8
518: skip 'this test needs UTF-8 locale'
519: end
520:
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>