commit rubygem-ruby_parser for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-ruby_parser for openSUSE:Factory checked in at 2015-04-18 10:41:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-ruby_parser (Old) and /work/SRC/openSUSE:Factory/.rubygem-ruby_parser.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-ruby_parser" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-ruby_parser/rubygem-ruby_parser.changes 2015-03-25 10:00:35.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-ruby_parser.new/rubygem-ruby_parser.changes 2015-04-18 10:41:04.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Apr 14 04:31:15 UTC 2015 - coolo@suse.com + +- updated to version 3.6.6 + +------------------------------------------------------------------- Old: ---- ruby_parser-3.6.5.gem New: ---- ruby_parser-3.6.6.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-ruby_parser.spec ++++++ --- /var/tmp/diff_new_pack.PoP6KR/_old 2015-04-18 10:41:04.000000000 +0200 +++ /var/tmp/diff_new_pack.PoP6KR/_new 2015-04-18 10:41:04.000000000 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-ruby_parser -Version: 3.6.5 +Version: 3.6.6 Release: 0 %define mod_name ruby_parser %define mod_full_name %{mod_name}-%{version} ++++++ ruby_parser-3.6.5.gem -> ruby_parser-3.6.6.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/History.txt new/History.txt --- old/History.txt 2015-03-12 23:58:18.000000000 +0100 +++ new/History.txt 2015-04-14 00:29:50.000000000 +0200 @@ -1,3 +1,17 @@ +=== 3.6.6 / 2015-04-13 + +* 1 minor enhancement: + + * Added expr_labelarg state (eg: a:1) + +* 5 bug fixes: + + * Fix scan logging backtrace when DEBUG=1 + * Fixed kwsplat on 2.0 & 2.1. + * Fixed mandatory keyword block args. (cvortmann) + * Handle #$<x> in expanded strings/regexps where x is NOT a valid gvar name. + * Invalid gvar names raise a compile error. + === 3.6.5 / 2015-03-12 * 1 minor enhancement: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2015-03-12 23:58:18.000000000 +0100 +++ new/Rakefile 2015-04-14 00:29:50.000000000 +0200 @@ -79,9 +79,9 @@ task "compare#{v}" do sh "./yack.rb lib/ruby#{v}_parser.output > racc#{v}.txt" sh "./yack.rb parse#{v}.output > yacc#{v}.txt" - sh "diff -du racc#{v}.txt yacc#{v}.txt || true" + sh "diff -du yacc#{v}.txt racc#{v}.txt || true" puts - sh "diff -du racc#{v}.txt yacc#{v}.txt | wc -l" + sh "diff -du yacc#{v}.txt racc#{v}.txt | wc -l" end end Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/checksums.yaml.gz.sig new/checksums.yaml.gz.sig --- old/checksums.yaml.gz.sig 2015-03-12 23:58:19.000000000 +0100 +++ new/checksums.yaml.gz.sig 2015-04-14 00:29:51.000000000 +0200 @@ -1,2 +1,4 @@ -Ð`Å(T¹¬]Z:ýlyÀËô1Ñ¿ëð! -ñ|-«(o¡¢OdI)5¬ÚÍ¢èägø¬_îB`žÓóÁh"±O lOóY§ûxBîW±hwèNKÞaКãÖÎ Qiu[ï.³N+Ä~XSFµŒUÁÁ¯-LkíMže[ÌgÙen÷ñ&Tcf|¡_uPOmÎiÀÊks_ð$çÝÛoÂfØÚèN(ÁÛж¶À#pQéùTÈHºÝóhŸ¢@ÝïvÝZ%Ž&WÀ+ÊBZÒîﲚ7VymÔ8µ¬æ \ No newline at end of file +OÍ#fßØ-Õ)ewqï³®*L;;«b"·jLRôõ + +â +ÛQ!¶f(Sötk°æQGk)WOÙÉEoºmZŒ!üi<OÏñô·&V7gðâ8£2æÿir=É^'oFÌ»õñJÛÅ%k²¢hâÝ0âBÛEn«dÆæáD$Ä¿/é¬9ô&kï980w44<Å_=Õ@ÁÞ)VmKÙ DøªBn6@7Ÿ©KiŸâO"$¡Z\RN21º~DŒJŒ9Zñ³A8±wž÷[34µOÛ²oYf@1Í~¥Öÿ \ No newline at end of file Files old/data.tar.gz.sig and new/data.tar.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby20_parser.rb new/lib/ruby20_parser.rb --- old/lib/ruby20_parser.rb 2015-03-12 23:58:19.000000000 +0100 +++ new/lib/ruby20_parser.rb 2015-04-14 00:29:51.000000000 +0200 @@ -6584,7 +6584,7 @@ end def _reduce_590(val, _values, result) - result = s(:kwsplat, val[1]) + result = s(:array, s(:kwsplat, val[1])) result end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby20_parser.y new/lib/ruby20_parser.y --- old/lib/ruby20_parser.y 2015-03-12 23:58:19.000000000 +0100 +++ new/lib/ruby20_parser.y 2015-04-14 00:29:51.000000000 +0200 @@ -2292,7 +2292,7 @@ } | tDSTAR arg_value { - result = s(:kwsplat, val[1]) + result = s(:array, s(:kwsplat, val[1])) } operation: tIDENTIFIER | tCONSTANT | tFID diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby21_parser.rb new/lib/ruby21_parser.rb --- old/lib/ruby21_parser.rb 2015-03-12 23:58:19.000000000 +0100 +++ new/lib/ruby21_parser.rb 2015-04-14 00:29:51.000000000 +0200 @@ -6479,7 +6479,11 @@ end def _reduce_561(val, _values, result) - raise "fuck 11" + label, _ = val[0] # TODO: fix lineno? + identifier = label.to_sym + self.env[identifier] = :lvar + + result = s(:array, s(:kwarg, identifier)) result end @@ -6655,7 +6659,7 @@ end def _reduce_594(val, _values, result) - result = s(:kwsplat, val[1]) + result = s(:array, s(:kwsplat, val[1])) result end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby21_parser.y new/lib/ruby21_parser.y --- old/lib/ruby21_parser.y 2015-03-12 23:58:19.000000000 +0100 +++ new/lib/ruby21_parser.y 2015-04-14 00:29:51.000000000 +0200 @@ -2172,7 +2172,11 @@ } | f_label { - raise "fuck 11" + label, _ = val[0] # TODO: fix lineno? + identifier = label.to_sym + self.env[identifier] = :lvar + + result = s(:array, s(:kwarg, identifier)) } f_block_kwarg: f_block_kw @@ -2307,7 +2311,7 @@ } | tDSTAR arg_value { - result = s(:kwsplat, val[1]) + result = s(:array, s(:kwsplat, val[1])) } operation: tIDENTIFIER | tCONSTANT | tFID diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_lexer.rb new/lib/ruby_lexer.rb --- old/lib/ruby_lexer.rb 2015-03-12 23:58:19.000000000 +0100 +++ new/lib/ruby_lexer.rb 2015-04-14 00:29:51.000000000 +0200 @@ -271,7 +271,7 @@ end def is_beg? - in_lex_state? :expr_beg, :expr_value, :expr_mid, :expr_class + in_lex_state? :expr_beg, :expr_value, :expr_mid, :expr_class, :expr_labelarg end def is_end? @@ -406,7 +406,8 @@ end def process_gvar_oddity text - result :expr_end, "$", "$" # TODO: wtf is this? + return result :expr_end, "$", "$" if text == "$" # TODO: wtf is this? + rb_compile_error "#{text.inspect} is not allowed as a global variable name" end def process_ivar text @@ -673,7 +674,7 @@ end if !ruby18 and is_label_possible? and scan(/:(?!:)/) then - return result(:expr_beg, :tLABEL, [token, self.lineno]) + return result(:expr_labelarg, :tLABEL, [token, self.lineno]) end unless in_lex_state? :expr_dot then @@ -1144,7 +1145,12 @@ if expand case - when scan(/#(?=[$@])/) then + when scan(/#(?=\$(-.|[a-zA-Z_0-9~\*\$\?!@\/\\;,\.=:<>\"\&\`\'+]))/) then + # TODO: !ISASCII + # ?! see parser_peek_variable_name + return :tSTRING_DVAR, nil + when scan(/#(?=\@\@?[a-zA-Z_])/) then + # TODO: !ISASCII return :tSTRING_DVAR, nil when scan(/#[{]/) then return :tSTRING_DBEG, nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_lexer.rex new/lib/ruby_lexer.rex --- old/lib/ruby_lexer.rex 2015-03-12 23:58:19.000000000 +0100 +++ new/lib/ruby_lexer.rex 2015-04-14 00:29:51.000000000 +0200 @@ -92,6 +92,7 @@ /\[/ process_square_bracket +# 2.2: /\'#{SSTRING}\':/o process_symbol /\'#{SSTRING}\'/o { result :expr_end, :tSTRING, matched[1..-2].gsub(/\\\\/, "\\").gsub(/\\'/, "'") } # " stupid emacs : /\|/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_parser_extras.rb new/lib/ruby_parser_extras.rb --- old/lib/ruby_parser_extras.rb 2015-03-12 23:58:19.000000000 +0100 +++ new/lib/ruby_parser_extras.rb 2015-04-14 00:29:51.000000000 +0200 @@ -79,7 +79,7 @@ alias :old_scan :scan def scan re s = old_scan re - where = caller.first.split(/:/).first(2).join(":") + where = caller[1].split(/:/).first(2).join(":") d :scan => [s, where] if s s end @@ -91,7 +91,7 @@ end module RubyParserStuff - VERSION = "3.6.5" unless constants.include? "VERSION" # SIGH + VERSION = "3.6.6" unless constants.include? "VERSION" # SIGH attr_accessor :lexer, :in_def, :in_single, :file attr_reader :env, :comments diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-03-12 23:58:18.000000000 +0100 +++ new/metadata 2015-04-14 00:29:50.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: ruby_parser version: !ruby/object:Gem::Version - version: 3.6.5 + version: 3.6.6 platform: ruby authors: - Ryan Davis @@ -29,7 +29,7 @@ xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO VpzF30vNaJK6ZT7xlIsIlwmH -----END CERTIFICATE----- -date: 2015-03-12 00:00:00.000000000 Z +date: 2015-04-13 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: sexp_processor @@ -51,14 +51,14 @@ requirements: - - ~> - !ruby/object:Gem::Version - version: '5.5' + version: '5.6' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version - version: '5.5' + version: '5.6' - !ruby/object:Gem::Dependency name: rdoc requirement: !ruby/object:Gem::Requirement Files old/metadata.gz.sig and new/metadata.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_ruby_lexer.rb new/test/test_ruby_lexer.rb --- old/test/test_ruby_lexer.rb 2015-03-12 23:58:19.000000000 +0100 +++ new/test/test_ruby_lexer.rb 2015-04-14 00:29:51.000000000 +0200 @@ -298,7 +298,7 @@ assert_lex3("{a:", nil, :tLBRACE, "{", :expr_beg, - :tLABEL, "a", :expr_beg) + :tLABEL, "a", :expr_labelarg) end def test_yylex_label_in_params__19 @@ -308,7 +308,7 @@ nil, :tIDENTIFIER, "foo", :expr_cmdarg, :tLPAREN2, "(", :expr_beg, - :tLABEL, "a", :expr_beg) + :tLABEL, "a", :expr_labelarg) end def test_yylex_paren_string_parens_interpolated @@ -852,9 +852,13 @@ end end - def test_yylex_dollar - assert_lex3("$", nil, "$", "$", :expr_end) - # FIX: wtf is this?!? + def test_yylex_dollar_bad + e = refute_lex("$%") + assert_includes(e.message, "is not allowed as a global variable name") + end + + def test_yylex_dollar_eos + assert_lex3("$", nil, "$", "$", :expr_end) # FIX: wtf is this?!? end def test_yylex_dot # HINT message sends @@ -2289,6 +2293,14 @@ :tSTRING_END, "\"", :expr_end) end + def test_yylex_string_double_pound_dollar_bad + assert_lex3('"#$%"', nil, + + :tSTRING_BEG, "\"", :expr_beg, + :tSTRING_CONTENT, "#$%", :expr_beg, + :tSTRING_END, "\"", :expr_end) + end + def test_yylex_string_double_nested_curlies assert_lex3("%{nest{one{two}one}nest}", nil, @@ -2611,6 +2623,35 @@ end end + def test_yylex_sym_quoted + assert_lex(":'a'", + s(:lit, :a), + + :tSYMBOL, "a", :expr_end, 0, 0) + end + + def test_yylex_hash_colon + assert_lex("{a:1}", + s(:hash, s(:lit, :a), s(:lit, 1)), + + :tLBRACE, "{", :expr_beg, 0, 1, + :tLABEL, "a", :expr_labelarg, 0, 1, + :tINTEGER, 1, :expr_end, 0, 1, + :tRCURLY, "}", :expr_endarg, 0, 0) + end + + def test_yylex_hash_colon_quoted_22 + skip "Waiting for 2.2 parser" + + assert_lex("{'a':1}", + s(:hash, s(:lit, :a), s(:lit, 1)), + + :tLBRACE, "{", :expr_beg, 0, 1, + :tSYMBOL, "a", :expr_end, 0, 1, + :tINTEGER, 1, :expr_end, 0, 1, + :tRCURLY, "}", :expr_endarg, 0, 0) + end + def test_ruby21_new_numbers skip "Don't have imaginary and rational literal lexing yet" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_ruby_parser.rb new/test/test_ruby_parser.rb --- old/test/test_ruby_parser.rb 2015-03-12 23:58:19.000000000 +0100 +++ new/test/test_ruby_parser.rb 2015-04-14 00:29:51.000000000 +0200 @@ -2142,21 +2142,30 @@ def test_defn_kwarg_env rb = "def test(**testing) test_splat(**testing) end" pt = s(:defn, :test, s(:args, :"**testing"), - s(:call, nil, :test_splat, s(:kwsplat, s(:lvar, :testing)))) + s(:call, nil, :test_splat, s(:hash, s(:kwsplat, s(:lvar, :testing))))) assert_parse rb, pt end def test_call_arg_kwsplat rb = "a(b, **1)" - pt = s(:call, nil, :a, s(:call, nil, :b), s(:kwsplat, s(:lit, 1))) + pt = s(:call, nil, :a, s(:call, nil, :b), s(:hash, s(:kwsplat, s(:lit, 1)))) + + assert_parse rb, pt + end + + def test_call_arg_assoc_kwsplat + rb = "f(1, kw: 2, **3)" + pt = s(:call, nil, :f, + s(:lit, 1), + s(:hash, s(:lit, :kw), s(:lit, 2), s(:kwsplat, s(:lit, 3)))) assert_parse rb, pt end def test_call_kwsplat rb = "a(**1)" - pt = s(:call, nil, :a, s(:kwsplat, s(:lit, 1))) + pt = s(:call, nil, :a, s(:hash, s(:kwsplat, s(:lit, 1)))) assert_parse rb, pt end @@ -3228,16 +3237,55 @@ end def test_block_kw + rb = "blah { |k:42| }" + pt = s(:iter, s(:call, nil, :blah), s(:args, s(:kwarg, :k, s(:lit, 42)))) + + assert_parse rb, pt + + rb = "blah { |k:42| }" + assert_parse rb, pt + end + + def test_block_kw__required + rb = "blah do |k:| end" + pt = s(:iter, s(:call, nil, :blah), s(:args, s(:kwarg, :k))) + + assert_parse rb, pt + + rb = "blah do |k:| end" + assert_parse rb, pt + end + + def test_stabby_block_kw rb = "-> (k:42) { }" pt = s(:iter, s(:call, nil, :lambda), s(:args, s(:kwarg, :k, s(:lit, 42)))) assert_parse rb, pt end - def test_block_kw__required + def test_stabby_block_kw__required rb = "-> (k:) { }" pt = s(:iter, s(:call, nil, :lambda), s(:args, s(:kwarg, :k))) assert_parse rb, pt end + + def test_parse_line_heredoc_hardnewline + skip "not yet" + + rb = <<-'CODE'.gsub(/^ /, '') + <<-EOFOO + \n\n\n\n\n\n\n\n\n + EOFOO + + class Foo + end + CODE + + pt = s(:block, + s(:str, "\n\n\n\n\n\n\n\n\n\n").line(1), + s(:class, :Foo, nil).line(5)).line(1) + + assert_parse rb, pt + end end
participants (1)
-
root@hilbert.suse.de