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 2016-03-01 09:40:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-10-30 21:53:00.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-ruby_parser.new/rubygem-ruby_parser.changes 2016-03-01 09:41:03.000000000 +0100 @@ -1,0 +2,13 @@ +Mon Jan 25 05:53:24 UTC 2016 - coolo@suse.com + +- updated to version 3.7.3 + see installed History.txt + + === 3.7.3 / 2016-01-21 + + * 2 bug fixes: + + * Fixed parsing kwargs in defs with no parens. (presidentbeef) + * defs should have a nil node if body is empty. + +------------------------------------------------------------------- Old: ---- ruby_parser-3.7.2.gem New: ---- ruby_parser-3.7.3.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-ruby_parser.spec ++++++ --- /var/tmp/diff_new_pack.aVj6Eh/_old 2016-03-01 09:41:04.000000000 +0100 +++ /var/tmp/diff_new_pack.aVj6Eh/_new 2016-03-01 09:41:04.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-ruby_parser # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-ruby_parser -Version: 3.7.2 +Version: 3.7.3 Release: 0 %define mod_name ruby_parser %define mod_full_name %{mod_name}-%{version} ++++++ ruby_parser-3.7.2.gem -> ruby_parser-3.7.3.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/History.txt new/History.txt --- old/History.txt 2015-10-26 23:42:46.000000000 +0100 +++ new/History.txt 2016-01-22 01:22:37.000000000 +0100 @@ -1,3 +1,10 @@ +=== 3.7.3 / 2016-01-21 + +* 2 bug fixes: + + * Fixed parsing kwargs in defs with no parens. (presidentbeef) + * defs should have a nil node if body is empty. + === 3.7.2 / 2015-10-26 * 1 bug fix: Files old/checksums.yaml.gz and new/checksums.yaml.gz differ Files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ 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-10-26 23:42:46.000000000 +0100 +++ new/lib/ruby20_parser.rb 2016-01-22 01:22:37.000000000 +0100 @@ -5058,7 +5058,7 @@ def _reduce_330(val, _values, result) self.in_single += 1 self.env.extend - lexer.lex_state = :expr_end # force for args + lexer.lex_state = :expr_endfn # force for args result = lexer.lineno result 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-10-26 23:42:47.000000000 +0100 +++ new/lib/ruby20_parser.y 2016-01-22 01:22:37.000000000 +0100 @@ -1168,7 +1168,7 @@ { self.in_single += 1 self.env.extend - lexer.lex_state = :expr_end # force for args + lexer.lex_state = :expr_endfn # force for args result = lexer.lineno } f_arglist bodystmt kEND 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-10-26 23:42:47.000000000 +0100 +++ new/lib/ruby21_parser.rb 2016-01-22 01:22:37.000000000 +0100 @@ -5110,7 +5110,7 @@ def _reduce_329(val, _values, result) self.in_single += 1 self.env.extend - lexer.lex_state = :expr_end # force for args + lexer.lex_state = :expr_endfn # force for args result = lexer.lineno result 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-10-26 23:42:47.000000000 +0100 +++ new/lib/ruby21_parser.y 2016-01-22 01:22:37.000000000 +0100 @@ -1167,7 +1167,7 @@ { self.in_single += 1 self.env.extend - lexer.lex_state = :expr_end # force for args + lexer.lex_state = :expr_endfn # force for args result = lexer.lineno } f_arglist bodystmt kEND diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby22_parser.rb new/lib/ruby22_parser.rb --- old/lib/ruby22_parser.rb 2015-10-26 23:42:47.000000000 +0100 +++ new/lib/ruby22_parser.rb 2016-01-22 01:22:37.000000000 +0100 @@ -5140,7 +5140,7 @@ def _reduce_329(val, _values, result) self.in_single += 1 self.env.extend - lexer.lex_state = :expr_end # force for args + lexer.lex_state = :expr_endfn # force for args result = lexer.lineno result diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby22_parser.y new/lib/ruby22_parser.y --- old/lib/ruby22_parser.y 2015-10-26 23:42:47.000000000 +0100 +++ new/lib/ruby22_parser.y 2016-01-22 01:22:37.000000000 +0100 @@ -1168,7 +1168,7 @@ { self.in_single += 1 self.env.extend - lexer.lex_state = :expr_end # force for args + lexer.lex_state = :expr_endfn # force for args result = lexer.lineno } f_arglist bodystmt kEND diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_lexer.rex.rb new/lib/ruby_lexer.rex.rb --- old/lib/ruby_lexer.rex.rb 2015-10-26 23:42:47.000000000 +0100 +++ new/lib/ruby_lexer.rex.rb 2016-01-22 01:22:37.000000000 +0100 @@ -1,7 +1,7 @@ # encoding: UTF-8 #-- # This file is automatically generated. Do not modify it. -# Generated by: oedipus_lex version 2.4.0. +# Generated by: oedipus_lex version 2.4.1. # Source: lib/ruby_lexer.rex #++ @@ -76,33 +76,33 @@ case state when nil then case - when text = ss.scan(/[\ \t\r\f\v]/) then + when ss.skip(/[\ \t\r\f\v]/) then action { self.space_seen = true; next } when text = ss.scan(/\n|\#/) then process_newline_or_comment text when text = ss.scan(/[\]\)\}]/) then process_bracing text - when ss.check(/\!/) then + when ss.match?(/\!/) then case - when in_arg_state? && (text = ss.scan(/\!\@/)) then + when in_arg_state? && (ss.skip(/\!\@/)) then action { result :expr_arg, :tUBANG, "!@" } when text = ss.scan(/\![=~]?/) then action { result :arg_state, TOKENS[text], text } end # group /\!/ - when ss.check(/\./) then + when ss.match?(/\./) then case when text = ss.scan(/\.\.\.?/) then action { result :expr_beg, TOKENS[text], text } - when text = ss.scan(/\.\d/) then + when ss.skip(/\.\d/) then action { rb_compile_error "no .<digit> floating literal anymore put 0 before dot" } - when text = ss.scan(/\./) then + when ss.skip(/\./) then action { result :expr_dot, :tDOT, "." } end # group /\./ when text = ss.scan(/\(/) then process_paren text when text = ss.scan(/\,/) then action { result :expr_beg, TOKENS[text], text } - when ss.check(/=/) then + when ss.match?(/=/) then case when text = ss.scan(/\=\=\=|\=\=|\=~|\=>|\=(?!begin\b)/) then action { result arg_state, TOKENS[text], text } @@ -121,7 +121,7 @@ action { rb_compile_error "`#{text}` is not allowed as a variable name" } when text = ss.scan(/\@\@?#{IDENT_CHAR}+/o) then process_ivar text - when ss.check(/:/) then + when ss.match?(/:/) then case when not_end? && (text = ss.scan(/:([a-zA-Z_]#{IDENT_CHAR}*(?:[?]|[!](?!=)|=(?==>)|=(?![=>]))?)/o)) then process_symbol text @@ -134,135 +134,135 @@ when text = ss.scan(/\:/) then process_colon1 text end # group /:/ - when text = ss.scan(/->/) then + when ss.skip(/->/) then action { result :expr_endfn, :tLAMBDA, nil } when text = ss.scan(/[+-]/) then process_plus_minus text - when ss.check(/[+\d]/) then + when ss.match?(/[+\d]/) then case - when text = ss.scan(/#{NUM_BAD}/o) then + when ss.skip(/#{NUM_BAD}/o) then action { rb_compile_error "Invalid numeric format" } - when text = ss.scan(/#{INT_DEC}/o) then + when ss.skip(/#{INT_DEC}/o) then action { int_with_base 10 } - when text = ss.scan(/#{INT_HEX}/o) then + when ss.skip(/#{INT_HEX}/o) then action { int_with_base 16 } - when text = ss.scan(/#{INT_BIN}/o) then + when ss.skip(/#{INT_BIN}/o) then action { int_with_base 2 } - when text = ss.scan(/#{INT_OCT_BAD}/o) then + when ss.skip(/#{INT_OCT_BAD}/o) then action { rb_compile_error "Illegal octal digit." } - when text = ss.scan(/#{INT_OCT}/o) then + when ss.skip(/#{INT_OCT}/o) then action { int_with_base 8 } - when text = ss.scan(/#{FLOAT_BAD}/o) then + when ss.skip(/#{FLOAT_BAD}/o) then action { rb_compile_error "Trailing '_' in number." } when text = ss.scan(/#{FLOAT}/o) then process_float text - when text = ss.scan(/#{INT_DEC2}/o) then + when ss.skip(/#{INT_DEC2}/o) then action { int_with_base 10 } - when text = ss.scan(/[0-9]/) then + when ss.skip(/[0-9]/) then action { rb_compile_error "Bad number format" } end # group /[+\d]/ when text = ss.scan(/\[/) then process_square_bracket text when was_label? && (text = ss.scan(/\'#{SSTRING}\':?/o)) then process_label_or_string text - when ss.check(/\|/) then + when ss.match?(/\|/) then case - when text = ss.scan(/\|\|\=/) then + when ss.skip(/\|\|\=/) then action { result :expr_beg, :tOP_ASGN, "||" } - when text = ss.scan(/\|\|/) then + when ss.skip(/\|\|/) then action { result :expr_beg, :tOROP, "||" } - when text = ss.scan(/\|\=/) then + when ss.skip(/\|\=/) then action { result :expr_beg, :tOP_ASGN, "|" } - when text = ss.scan(/\|/) then + when ss.skip(/\|/) then action { result :arg_state, :tPIPE, "|" } end # group /\|/ when text = ss.scan(/\{/) then process_curly_brace text - when ss.check(/\*/) then + when ss.match?(/\*/) then case - when text = ss.scan(/\*\*=/) then + when ss.skip(/\*\*=/) then action { result :expr_beg, :tOP_ASGN, "**" } - when text = ss.scan(/\*\*/) then + when ss.skip(/\*\*/) then action { result(:arg_state, space_vs_beginning(:tDSTAR, :tDSTAR, :tPOW), "**") } - when text = ss.scan(/\*\=/) then + when ss.skip(/\*\=/) then action { result(:expr_beg, :tOP_ASGN, "*") } - when text = ss.scan(/\*/) then + when ss.skip(/\*/) then action { result(:arg_state, space_vs_beginning(:tSTAR, :tSTAR, :tSTAR2), "*") } end # group /\*/ - when ss.check(/) then + when ss.match?(/) then case - when text = ss.scan(/\<\=\>/) then + when ss.skip(/\<\=\>/) then action { result :arg_state, :tCMP, "<=>" } - when text = ss.scan(/\<\=/) then + when ss.skip(/\<\=/) then action { result :arg_state, :tLEQ, "<=" } - when text = ss.scan(/\<\<\=/) then + when ss.skip(/\<\<\=/) then action { result :arg_state, :tOP_ASGN, "<<" } when text = ss.scan(/\<\) then process_lchevron text - when text = ss.scan(/\) then + when ss.skip(/\) then action { result :arg_state, :tLT, "<" } end # group / - when ss.check(/>/) then + when ss.match?(/>/) then case - when text = ss.scan(/\>\=/) then + when ss.skip(/\>\=/) then action { result :arg_state, :tGEQ, ">=" } - when text = ss.scan(/\>\>=/) then + when ss.skip(/\>\>=/) then action { result :arg_state, :tOP_ASGN, ">>" } - when text = ss.scan(/\>\>/) then + when ss.skip(/\>\>/) then action { result :arg_state, :tRSHFT, ">>" } - when text = ss.scan(/\>/) then + when ss.skip(/\>/) then action { result :arg_state, :tGT, ">" } end # group />/ - when ss.check(/\`/) then + when ss.match?(/\`/) then case - when expr_fname? && (text = ss.scan(/\`/)) then + when expr_fname? && (ss.skip(/\`/)) then action { result(:expr_end, :tBACK_REF2, "`") } - when expr_dot? && (text = ss.scan(/\`/)) then + when expr_dot? && (ss.skip(/\`/)) then action { result((command_state ? :expr_cmdarg : :expr_arg), :tBACK_REF2, "`") } - when text = ss.scan(/\`/) then + when ss.skip(/\`/) then action { string STR_XQUOTE, '`'; result(nil, :tXSTRING_BEG, "`") } end # group /\`/ when text = ss.scan(/\?/) then process_questionmark text - when ss.check(/&/) then + when ss.match?(/&/) then case - when text = ss.scan(/\&\&\=/) then + when ss.skip(/\&\&\=/) then action { result(:expr_beg, :tOP_ASGN, "&&") } - when text = ss.scan(/\&\&/) then + when ss.skip(/\&\&/) then action { result(:expr_beg, :tANDOP, "&&") } - when text = ss.scan(/\&\=/) then + when ss.skip(/\&\=/) then action { result(:expr_beg, :tOP_ASGN, "&" ) } when text = ss.scan(/\&/) then process_amper text end # group /&/ when text = ss.scan(/\//) then process_slash text - when ss.check(/\^/) then + when ss.match?(/\^/) then case - when text = ss.scan(/\^=/) then + when ss.skip(/\^=/) then action { result(:expr_beg, :tOP_ASGN, "^") } - when text = ss.scan(/\^/) then + when ss.skip(/\^/) then action { result(:arg_state, :tCARET, "^") } end # group /\^/ - when text = ss.scan(/\;/) then + when ss.skip(/\;/) then action { self.command_start = true; result(:expr_beg, :tSEMI, ";") } - when ss.check(/~/) then + when ss.match?(/~/) then case - when in_arg_state? && (text = ss.scan(/\~@/)) then + when in_arg_state? && (ss.skip(/\~@/)) then action { result(:arg_state, :tTILDE, "~") } - when text = ss.scan(/\~/) then + when ss.skip(/\~/) then action { result(:arg_state, :tTILDE, "~") } end # group /~/ - when ss.check(/\\/) then + when ss.match?(/\\/) then case - when text = ss.scan(/\\\r?\n/) then + when ss.skip(/\\\r?\n/) then action { self.lineno += 1; self.space_seen = true; next } - when text = ss.scan(/\\/) then + when ss.skip(/\\/) then action { rb_compile_error "bare backslash only allowed before newline" } end # group /\\/ when text = ss.scan(/\%/) then process_percent text - when ss.check(/\$/) then + when ss.match?(/\$/) then case when text = ss.scan(/\$_\w+/) then process_gvar text @@ -289,7 +289,7 @@ process_underscore text when text = ss.scan(/#{IDENT}/o) then process_token text - when text = ss.scan(/\004|\032|\000|\Z/) then + when ss.skip(/\004|\032|\000|\Z/) then action { [RubyLexer::EOF, RubyLexer::EOF] } when text = ss.scan(/./) then action { rb_compile_error "Invalid char #{text.inspect} in expression" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_parser.yy new/lib/ruby_parser.yy --- old/lib/ruby_parser.yy 2015-10-26 23:42:47.000000000 +0100 +++ new/lib/ruby_parser.yy 2016-01-22 01:22:37.000000000 +0100 @@ -1203,7 +1203,7 @@ { self.in_single += 1 self.env.extend - lexer.lex_state = :expr_end # force for args + lexer.lex_state = :expr_endfn # force for args result = lexer.lineno } f_arglist bodystmt kEND 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-10-26 23:42:47.000000000 +0100 +++ new/lib/ruby_parser_extras.rb 2016-01-22 01:22:37.000000000 +0100 @@ -91,7 +91,7 @@ end module RubyParserStuff - VERSION = "3.7.2" unless constants.include? "VERSION" # SIGH + VERSION = "3.7.3" unless constants.include? "VERSION" # SIGH attr_accessor :lexer, :in_def, :in_single, :file attr_reader :env, :comments @@ -645,6 +645,7 @@ def new_defs val recv, name, args, body = val[1], val[4], val[6], val[7] + body ||= s(:nil) result = s(:defs, recv, name.to_sym, args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-10-26 23:42:46.000000000 +0100 +++ new/metadata 2016-01-22 01:22:37.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: ruby_parser version: !ruby/object:Gem::Version - version: 3.7.2 + version: 3.7.3 platform: ruby authors: - Ryan Davis @@ -29,7 +29,7 @@ qx3h45R1CAsObX0SQDIT+rRbQrtKz1GHIZTOFYvEJjUY1XmRTZupD3CJ8Q7sDqSy NLq5jm1fq6Y9Uolu3RJbmycf -----END CERTIFICATE----- -date: 2015-10-26 00:00:00.000000000 Z +date: 2016-01-22 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: sexp_processor 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-10-26 23:42:47.000000000 +0100 +++ new/test/test_ruby_lexer.rb 2016-01-22 01:22:37.000000000 +0100 @@ -86,7 +86,12 @@ act_value = act_value.first if Array === act_value assert_equal token, act_token, msg - assert_equal value, act_value, msg + case value + when Float then + assert_in_epsilon value, act_value, 0.001, msg + else + assert_equal value, act_value, msg + end assert_equal state, @lex.lex_state, msg if state assert_equal paren, @lex.paren_nest, msg if paren assert_equal brace, @lex.brace_nest, msg if brace 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-10-26 23:42:47.000000000 +0100 +++ new/test/test_ruby_parser.rb 2016-01-22 01:22:37.000000000 +0100 @@ -269,7 +269,7 @@ def test_defs_comments rb = "# blah 1\n# blah 2\n\ndef self.blah\nend" - pt = s(:defs, s(:self), :blah, s(:args)) + pt = s(:defs, s(:self), :blah, s(:args), s(:nil)) assert_parse rb, pt assert_equal "# blah 1\n# blah 2\n\n", result.comments @@ -1330,7 +1330,7 @@ def test_defns_reserved rb = "def self.return; end" - pt = s(:defs, s(:self), :return, s(:args)) + pt = s(:defs, s(:self), :return, s(:args), s(:nil)) assert_parse rb, pt end @@ -2171,8 +2171,6 @@ module TestRubyParserShared20to22 def test_defs_kwarg - skip "not yet" - rb = "def self.a b: 1\nend" pt = s(:defs, s(:self), :a, s(:args, s(:kwarg, :b, s(:lit, 1))), s(:nil))
participants (1)
-
root@hilbert.suse.de