Skip to content

Commit ec5389c

Browse files
committed
Implement to_ary to avoid calls to method_missing
* I'm not gonna lie, I totally ripped this from @tenderlove * See rubygems/bundler#1274
1 parent 77d7262 commit ec5389c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/grape/route.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ def method_missing(method_id, *arguments)
1818
def to_s
1919
"version=#{route_version}, method=#{route_method}, path=#{route_path}"
2020
end
21-
21+
22+
private
23+
def to_ary
24+
nil
25+
end
26+
2227
end
2328
end

0 commit comments

Comments
 (0)