From ed7a3cde67cfb7a46c3b674d7f9cb65fc9340ffd Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 25 Jan 2017 18:16:03 +0900 Subject: This seems to be working on JRuby 9K MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit % ruby -ve "p 'ほげ'.encode(Encoding::UTF_8_MAC)" jruby 1.7.26 (1.9.3p551) 2016-08-26 69763b8 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14 +jit [darwin-x86_64] "\u307B\u3052" % ruby -ve "p 'ほげ'.encode(Encoding::UTF_8_MAC)" jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64] "\u307B\u3051\u3099" % ruby -ve "p 'ほげ'.encode(Encoding::UTF_8_MAC)" ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin14] "\u307B\u3051\u3099" --- activesupport/test/inflector_test.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'activesupport') diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 8d39303f9b..03d7b3fe94 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -271,35 +271,25 @@ class InflectorTest < ActiveSupport::TestCase end end - # FIXME: get following tests to pass on jruby, currently skipped - # - # Currently this fails because ActiveSupport::Multibyte::Unicode#tidy_bytes - # required a specific Encoding::Converter(UTF-8 to UTF8-MAC) which unavailable on JRuby - # causing our tests to error out. - # related bug http://jira.codehaus.org/browse/JRUBY-7194 def test_parameterize - jruby_skip "UTF-8 to UTF8-MAC Converter is unavailable" StringToParameterized.each do |some_string, parameterized_string| assert_equal(parameterized_string, ActiveSupport::Inflector.parameterize(some_string)) end end def test_parameterize_and_normalize - jruby_skip "UTF-8 to UTF8-MAC Converter is unavailable" StringToParameterizedAndNormalized.each do |some_string, parameterized_string| assert_equal(parameterized_string, ActiveSupport::Inflector.parameterize(some_string)) end end def test_parameterize_with_custom_separator - jruby_skip "UTF-8 to UTF8-MAC Converter is unavailable" StringToParameterizeWithUnderscore.each do |some_string, parameterized_string| assert_equal(parameterized_string, ActiveSupport::Inflector.parameterize(some_string, separator: "_")) end end def test_parameterize_with_multi_character_separator - jruby_skip "UTF-8 to UTF8-MAC Converter is unavailable" StringToParameterized.each do |some_string, parameterized_string| assert_equal(parameterized_string.gsub("-", "__sep__"), ActiveSupport::Inflector.parameterize(some_string, separator: "__sep__")) end -- cgit v1.2.3