Issue #13500 has been updated by MSP-Greg (Greg L).


Today (2017-04-26), I built `ruby 2.5.0dev (2017-04-26 trunk 58487) [x64-mingw32]`

To complete test-all, it required additional patches for:

```
test/fileutils/test_fileutils.rb
test/ruby/test_arity.rb
test/ruby/test_keyword.rb
test/ruby/test_yield.rb
```

After those patches, it had the following result:

```
16622 tests, 2222464 assertions, 8 failures, 1 errors, 114 skips
```

Yesterday, I built `ruby 2.5.0dev (2017-04-25 trunk 58476) [x64-mingw32]`

With the following result (no 'additional' patches were required):

```
16622 tests, 2227747 assertions, 8 failures, 1 errors, 114 skips
```

Today and yesterday's builds both used patches for the following:

```
test/ruby/test_enum.rb
test/socket/test_socket.rb
```

I believe most of the assertion differential is due to the patch for `test/ruby/test_yield.rb`, which is:

```diff
--- a/test/ruby/test_yield.rb	Sat Apr 22 07:41:22 2017
+++ b/test/ruby/test_yield.rb	Sat Apr 22 15:45:20 2017
@@ -372,7 +372,7 @@
   end
 
   def test_yield_lambda
-    assert_all_sentences(Syntax, :test_lambda, 4) {|t|
+    assert_all_sentences(Syntax, :test_lambda, 2) {|t|
       check_nofork(t, true)
     }
   end
```

Many of the tests that require patches seem to involve error handling.  If one's code is not heavily reliant on `rescue` clauses, this may not cause user issues.

Regardless, test-all should not silently stop.

----------------------------------------
Bug #13500: MinGW TestArity#test_proc_err_mess stops testing
https://bugs.ruby-lang.org/issues/13500#change-64490

* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-04-24 trunk 58462) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
With MinGW build of `ruby 2.5.0dev (2017-04-24 trunk 58462) [x64-mingw32]`, both test-all and an external test stop in [`TestArity#test_proc_err_mess`](https://github.com/ruby/ruby/blob/b3209c258eddc093ffdcbf77ee079cdc93f094ae/test/ruby/test_arity.rb#L49).

Solution is to either add the following line `args.to_s` --

```ruby
  def err_mess(method_proc = nil, argc = 0)
    args = (1..argc).to_a
    assert_raise_with_message(ArgumentError, /wrong number of arguments \(.*\b(\d+)\b.* (\d\S*?)\)/) do
      case method_proc
      when nil
        yield
      when Symbol
        method(method_proc).call(*args)
      else 
+       args.to_s
        method_proc.call(*args)
      end
    end
    [$1, $2]
  end
```

or comment out the two lines --

```ruby
  def test_proc_err_mess
#   assert_equal %w[0 1..2],  err_mess(->(b, c=42){}, 0)
    assert_equal %w[1 2+],    err_mess(->(a, b, c=42, *d){}, 1)
    assert_equal %w[3 4+],    err_mess(->(a, b, *c, d, e){}, 3)
    assert_equal %w[3 1..2],  err_mess(->(b, c=42){}, 3)
#   assert_equal %w[1 0],     err_mess(->(&block){}, 1)
    # Double checking:
    p = Proc.new{|b, c=42| :ok}
    assert_equal :ok,  p.call(1, 2, 3)
    assert_equal :ok,  p.call
  end
```

Once again, seems very odd.  I have no idea why the first solution would change anything...  Since this is a silent failure, if there's anything I can do to get more info, please let me know.

Also, there may be more issues; I haven't gone back to test-all with this patched to see if it completes.

Thank you.



-- 
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>