diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-10-09 00:54:12 -1000 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-09 00:54:12 -1000 |
commit | 2954cf13697cac564ec8a5f30638aa699b1874c1 (patch) | |
tree | 90a26eb545cf815901fcfc4eea8a14fa67defce0 /actionpack/lib/action_dispatch/http/mime_type.rb | |
parent | ee37ff46e9ad381a8331a6a3deed001b001f75ee (diff) | |
download | rails-2954cf13697cac564ec8a5f30638aa699b1874c1.tar.gz rails-2954cf13697cac564ec8a5f30638aa699b1874c1.tar.bz2 rails-2954cf13697cac564ec8a5f30638aa699b1874c1.zip |
Avoid super in define_method for Rubinius
Diffstat (limited to 'actionpack/lib/action_dispatch/http/mime_type.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_type.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index cc989d6625..e85823d8db 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -10,7 +10,12 @@ module Mime %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 |