[#83773] [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769 — usa@...
Issue #14108 has been updated by usa (Usaku NAKAMURA).
9 messages
2017/11/15
[#83774] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
usa@garbagecollect.jp wrote:
[#83775] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric
[#83779] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#83781] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric,
[#83782] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[ruby-core:83886] [Ruby trunk Feature#3219][Rejected] assert now passes non-boolean result
From:
mame@...
Date:
2017-11-27 07:29:37 UTC
List:
ruby-core #83886
Issue #3219 has been updated by mame (Yusuke Endoh).
Status changed from Assigned to Rejected
I don't remember this ticket, but I guess this request should be handled in [the upstream of test/unit](https://github.com/test-unit/test-unit). (Or, if you want to change `test/lib/minitest`, please change freely.)
----------------------------------------
Feature #3219: assert now passes non-boolean result
https://bugs.ruby-lang.org/issues/3219#change-67924
* Author: nobu (Nobuyoshi Nakada)
* Status: Rejected
* Priority: Normal
* Assignee: sorah (Sorah Fukumori)
* Target version: next minor
----------------------------------------
Hi,
Test::Unit::Assertions#assert now passes non-boolean values
(neither true nor false).
It is not only an incompatibility against former TestUnit, also
makes wrong tests (e.g., [ruby-core:29861]) passing.
```
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index 821faf5..52d5201 100644
--- a/lib/test/unit/assertions.rb
+++ b/lib/test/unit/assertions.rb
@@ -10,6 +10,16 @@ module Test
obj.pretty_inspect.chomp
end
+ def assert(result, *args, &b)
+ super(result == true || result == false, "assertion result must be true or false")
+ super
+ end
+
+ def refute(result, *args, &b)
+ super(result == true || result == false, "assertion result must be true or false")
+ super
+ end
+
def assert_raise(*args, &b)
assert_raises(*args, &b)
end
```
--
Nobu Nakada
--
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>