ruby-changes:57179
From: Hiroshi <ko1@a...>
Date: Mon, 19 Aug 2019 18:38:34 +0900 (JST)
Subject: [ruby-changes:57179] Hiroshi SHIBATA: 209ea85b54 (master): Make portable for standalone test-unit gem.
https://git.ruby-lang.org/ruby.git/commit/?id=209ea85b54 From 209ea85b54c9229f0c1e5c730dee05a096599eb0 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Mon, 19 Aug 2019 18:37:22 +0900 Subject: Make portable for standalone test-unit gem. * It can invoke test-unit with envutil.rb * refute_match of test-unit couldn't handle String instance. diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb index 4a7300f..5bec21c 100644 --- a/test/uri/test_common.rb +++ b/test/uri/test_common.rb @@ -1,5 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/test/uri/test_common.rb#L1 # frozen_string_literal: false require 'test/unit' +require 'envutil' require 'uri' module URI diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb index c850eb0..90f779c 100644 --- a/test/uri/test_generic.rb +++ b/test/uri/test_generic.rb @@ -1,5 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/test/uri/test_generic.rb#L1 # frozen_string_literal: false require 'test/unit' +require 'envutil' require 'uri' class URI::TestGeneric < Test::Unit::TestCase @@ -765,7 +766,7 @@ class URI::TestGeneric < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/uri/test_generic.rb#L766 e = assert_raise(URI::InvalidComponentError) do uri.password = password end - refute_match password, e.message + refute_match Regexp.new(password), e.message end def test_set_scheme -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/