diff options
author | Xavier Noria <fxn@hashref.com> | 2008-05-19 21:37:08 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2008-05-19 21:37:08 +0200 |
commit | 69597df908334df5ed0c55794d28f17865d448b8 (patch) | |
tree | e9ad6ffff8cb7171ef853611a2a39ef7755be25f | |
parent | 1855fd29e00c2eeaf77ef34bb2b8de502eaf3655 (diff) | |
download | rails-69597df908334df5ed0c55794d28f17865d448b8.tar.gz rails-69597df908334df5ed0c55794d28f17865d448b8.tar.bz2 rails-69597df908334df5ed0c55794d28f17865d448b8.zip |
#method vs +method+ in Active Support
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 6 | ||||
-rw-r--r-- | activesupport/lib/active_support/values/time_zone.rb | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index 6aa379b550..758aef5445 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -144,8 +144,8 @@ module ActiveSupport end end - # Stand-in for @request, @attributes, @params, etc which emits deprecation - # warnings on any method call (except #inspect). + # Stand-in for <tt>@request</tt>, <tt>@attributes</tt>, <tt>@params</tt>, etc. + # which emits deprecation warnings on any method call (except +inspect+). class DeprecatedInstanceVariableProxy #:nodoc: silence_warnings do instance_methods.each { |m| undef_method m unless m =~ /^__/ } diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 48606dbcff..fbdc680235 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -62,7 +62,7 @@ module ActiveSupport utc? && alternate_utc_string || utc_offset.to_utc_offset_s(colon) end - # Time uses #zone to display the time zone abbreviation, so we're duck-typing it + # Time uses +zone+ to display the time zone abbreviation, so we're duck-typing it. def zone period.zone_identifier.to_s end @@ -132,8 +132,8 @@ module ActiveSupport utc == other end - # If wrapped #time is a DateTime, use DateTime#since instead of #+ - # Otherwise, just pass on to #method_missing + # If wrapped #time is a DateTime, use DateTime#since instead of <tt>+</tt>. + # Otherwise, just pass on to +method_missing+. def +(other) result = utc.acts_like?(:date) ? utc.since(other) : utc + other result.in_time_zone(time_zone) diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index f522b64108..323429d126 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -335,7 +335,7 @@ class TimeZone # Return a TimeZone instance with the given name, or +nil+ if no # such TimeZone instance exists. (This exists to support the use of - # this class with the #composed_of macro.) + # this class with the +composed_of+ macro.) def new(name) self[name] end |