diff --git a/test/test-main.rb b/test/test-main.rb index eca7b21..eed7e51 100644 --- a/test/test-main.rb +++ b/test/test-main.rb @@ -286,6 +286,19 @@ errmsgs << <<'END' 7: syntax error, unexpected end-of-input, expecting keyword_end END + elsif ruby24? + errmsgs << <<'END' +3: syntax error, unexpected ']', expecting ')' +
  • '; _buf << ( item[:name]] ).to_s; _buf << '
  • + ^ +-:4: syntax error, unexpected keyword_end, expecting ')' +'; end + ^ +-:7: syntax error, unexpected end-of-input, expecting ')' +END + errmsgs << <<'END' +7: syntax error, unexpected end-of-input, expecting keyword_end +END elsif rubinius? errmsgs << <<'END' 3: expecting ')' diff --git a/test/test-users-guide.rb b/test/test-users-guide.rb index af6c006..620a556 100644 --- a/test/test-users-guide.rb +++ b/test/test-users-guide.rb @@ -28,7 +28,7 @@ class KwarkUsersGuideTest < Test::Unit::TestCase s =~ /\A\$ (.*?)\n/ command = $1 expected = $' - if ruby19? || ruby20? || ruby21? || ruby22? || ruby23? + if ruby19? || ruby20? || ruby21? || ruby22? || ruby23? || ruby24? case @name when 'test_main_program1_result' expected.sub!('["eruby", "items", "x", "_buf"]', '[:_buf, :eruby, :items, :x]') diff --git a/test/testutil.rb b/test/testutil.rb index e9130b7..13db7d5 100644 --- a/test/testutil.rb +++ b/test/testutil.rb @@ -33,6 +33,10 @@ def ruby23? # :nodoc: RUBY_VERSION =~ /\A2.3/ end +def ruby24? # :nodoc: + RUBY_VERSION =~ /\A2.4/ +end + def rubinius? # :nodoc: defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx" end