aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-06-07 21:39:55 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-06-08 00:26:09 -0300
commit1d3618a9b47d3160af00992756a4487906e39bcb (patch)
tree9ab0d0b449229f4a470f57f337ce133ed9b48932 /activerecord/lib/active_record
parentf2f63bf2ffa00d6187405c5851713d9fee68d5d3 (diff)
downloadrails-1d3618a9b47d3160af00992756a4487906e39bcb.tar.gz
rails-1d3618a9b47d3160af00992756a4487906e39bcb.tar.bz2
rails-1d3618a9b47d3160af00992756a4487906e39bcb.zip
remove warning: assigned but unused variable
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/collection_proxy.rb2
-rw-r--r--activerecord/lib/active_record/base.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb
index 81b4a26b04..5267116c42 100644
--- a/activerecord/lib/active_record/associations/collection_proxy.rb
+++ b/activerecord/lib/active_record/associations/collection_proxy.rb
@@ -67,7 +67,7 @@ module ActiveRecord
def method_missing(method, *args, &block)
match = DynamicFinderMatch.match(method)
if match && match.instantiator?
- record = send(:find_or_instantiator_by_attributes, match, match.attribute_names, *args) do |r|
+ send(:find_or_instantiator_by_attributes, match, match.attribute_names, *args) do |r|
@association.send :set_owner_attributes, r
@association.send :add_to_target, r
yield(r) if block_given?
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 08cc282d09..c2b09ad393 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -2006,7 +2006,7 @@ MSG
set_values = (1..3).collect{|position| values_hash_from_param[position].blank? ? 1 : values_hash_from_param[position]}
begin
Date.new(*set_values)
- rescue ArgumentError => ex # if Date.new raises an exception on an invalid date
+ rescue ArgumentError # if Date.new raises an exception on an invalid date
instantiate_time_object(name, set_values).to_date # we instantiate Time object and convert it back to a date thus using Time's logic in handling invalid dates
end
end