Skip to content

Commit 2b34a37

Browse files
committed
Updated for changes to splat node in many contexts.
[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 4448]
1 parent fa8f8c3 commit 2b34a37

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

History.txt

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
=== 2.0.1 / 2008-11-04
2+
3+
* 2 minor enhancements:
4+
5+
* Updated for changes to splat node in many contexts.
6+
* Made PT a developer dep
7+
18
=== 2.0.0 / 2008-10-22
29

310
* 1 major enhancement

bin/ruby_parse

+1-2
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,4 @@ puts format % [total_time,
8585
total_kbytes / total_time,
8686
total_kbytes,
8787
total_loc,
88-
"TOTAL"]
89-
88+
"TOTAL"] unless total_time == 0

lib/ruby_parser.y

-1
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,6 @@ rule
717717
| tSTAR arg opt_nl
718718
{
719719
result = s(:array, s(:splat, val[1]))
720-
result.paren = true
721720
}
722721

723722
paren_args: tLPAREN2 none tRPAREN

lib/ruby_parser_extras.rb

+1-6
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def scan re
113113
end
114114

115115
class RubyParser < Racc::Parser
116-
VERSION = '2.0.0'
116+
VERSION = '2.0.1'
117117

118118
attr_accessor :lexer, :in_def, :in_single, :file
119119
attr_reader :env, :comments
@@ -647,10 +647,6 @@ def new_super args
647647
s(:super, args)
648648
else
649649
args ||= s(:arglist)
650-
if args[0] == :arglist && args.splat then
651-
args[0] = :array
652-
args = s(:dummy, args)
653-
end
654650
s(:super, *args[1..-1])
655651
end
656652
end
@@ -708,7 +704,6 @@ def new_yield args = nil
708704

709705
# TODO: I can prolly clean this up
710706
args[0] = :arglist if args.first == :array
711-
args[0] = :array if args[0] == :arglist && args.splat
712707
args = s(:arglist, args) unless args.first == :arglist
713708

714709
return s(:yield, *args[1..-1])

0 commit comments

Comments
 (0)