Skip to content

Commit 8cfd260

Browse files
committed
Merge pull request #29 from mohawkjohn/fix_method_missing
Fixed missing call to super in method_missing
2 parents 6e991c7 + 5c3177a commit 8cfd260

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/nyaplot/data.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,14 @@ def column_labels
170170
@rows[0].keys
171171
end
172172

173-
def method_missing(name, *args)
173+
def method_missing(name, *args, &block)
174174
if md = name.match(/(.+)\=/)
175175
self.insert_column(name[/(.+)\=/].delete("="), args[0])
176176
return
177-
else
177+
elsif column_labels.include?(name)
178178
return self.column(name)
179+
else
180+
super(name, *args, &block)
179181
end
180182
end
181183
end

0 commit comments

Comments
 (0)