Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid super in define_method for Rubinius

  • Loading branch information...
commit 2954cf13697cac564ec8a5f30638aa699b1874c1 1 parent ee37ff4
@wycats wycats authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 actionpack/lib/action_dispatch/http/mime_type.rb
View
7 actionpack/lib/action_dispatch/http/mime_type.rb
@@ -10,7 +10,12 @@ def symbols
%w(<< concat shift unshift push pop []= clear compact! collect!
delete delete_at delete_if flatten! map! insert reject! reverse!
replace slice! sort! uniq!).each do |method|
- define_method(method) {|*args| @symbols = nil; super(*args) }
+ module_eval <<-CODE
+ def #{method}(*args)
+ @symbols = nil
+ super
+ end
+ CODE
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.