aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-09-27 10:41:12 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-09-27 10:41:12 +0000
commit053d057a88ac7c4a713666a58306861a2b1bd78c (patch)
tree0d0d53a8bd9b7239ee21a2cff7ec4c59ab0ff48d /activesupport/lib/active_support
parentb01a7c69fc8554c2e696609ea8ab76875d405165 (diff)
downloadrails-053d057a88ac7c4a713666a58306861a2b1bd78c.tar.gz
rails-053d057a88ac7c4a713666a58306861a2b1bd78c.tar.bz2
rails-053d057a88ac7c4a713666a58306861a2b1bd78c.zip
send -> send! for some private methods
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7659 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/option_merger.rb12
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb2
2 files changed, 7 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/option_merger.rb b/activesupport/lib/active_support/option_merger.rb
index 29119d0dca..1a4ff9db9a 100644
--- a/activesupport/lib/active_support/option_merger.rb
+++ b/activesupport/lib/active_support/option_merger.rb
@@ -1,25 +1,25 @@
module ActiveSupport
class OptionMerger #:nodoc:
- instance_methods.each do |method|
+ 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
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
index c67af60926..ab9e2cfde8 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -76,7 +76,7 @@ class TimeZone
# Create a new TimeZone instance with the given name and offset.
def create(name, offset)
zone = allocate
- zone.send :initialize, name, offset
+ zone.send!(:initialize, name, offset)
zone
end