vendor/rails/activesupport/lib/active_support/option_merger.rb in radiant-0.6.4 vs vendor/rails/activesupport/lib/active_support/option_merger.rb in radiant-0.6.5
- old
+ new
@@ -1,25 +1,25 @@
module ActiveSupport
class OptionMerger #:nodoc:
- instance_methods.each do |method|
- undef_method(method) if method !~ /^(__|instance_eval|class)/
+ instance_methods.each do |method|
+ undef_method(method) if method !~ /^(__|instance_eval|class|object_id)/
end
-
+
def initialize(context, options)
@context, @options = context, options
end
-
+
private
def method_missing(method, *arguments, &block)
merge_argument_options! arguments
- @context.send(method, *arguments, &block)
+ @context.send!(method, *arguments, &block)
end
-
+
def merge_argument_options!(arguments)
arguments << if arguments.last.respond_to? :to_hash
@options.merge(arguments.pop)
else
@options.dup
- end
+ end
end
end
end