File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 8383* Fix lexer to detect dereferencing on local variables even when whitespace
8484 is present (` a = 0; a [0] ` parses as a deference on a).
8585
86+ * Fix various ` Struct ` methods. Fixed ` #each ` and ` #each_pair ` to return
87+ self.
88+
8689## 0.5.5 2013-11-25
8790
8891* Fix regression: add ` %i[foo bar] ` style words back to lexer
Original file line number Diff line number Diff line change @@ -89,12 +89,14 @@ def each
8989 return enum_for :each unless block_given?
9090
9191 members . each { |name | yield self [ name ] }
92+ self
9293 end
9394
9495 def each_pair
9596 return enum_for :each_pair unless block_given?
9697
9798 members . each { |name | yield name , self [ name ] }
99+ self
98100 end
99101
100102 def eql? ( other )
Original file line number Diff line number Diff line change @@ -317,6 +317,8 @@ core/string/upcase_spec
317317
318318core/symbol/to_proc_spec
319319
320+ core/struct/each_pair_spec
321+ core/struct/each_spec
320322core/struct/initialize_spec
321323core/struct/new_spec
322324
You can’t perform that action at this time.
0 commit comments