aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-07-30 02:30:04 +0200
committerXavier Noria <fxn@hashref.com>2010-07-30 02:30:04 +0200
commit755af497555fde16db86f7e51f6462b0aca79b49 (patch)
tree9280835167f7ea7422df010f67c65c729dd26de1 /activesupport/lib/active_support/core_ext
parenta7a6a2ff46b173b420bd493d727772531d72658f (diff)
downloadrails-755af497555fde16db86f7e51f6462b0aca79b49.tar.gz
rails-755af497555fde16db86f7e51f6462b0aca79b49.tar.bz2
rails-755af497555fde16db86f7e51f6462b0aca79b49.zip
edit pass to apply API guideline wrt the use of "# =>" in example code
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/array/uniq_by.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/enumerable.rb3
-rw-r--r--activesupport/lib/active_support/core_ext/string/multibyte.rb10
3 files changed, 8 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/uniq_by.rb b/activesupport/lib/active_support/core_ext/array/uniq_by.rb
index a09b2302fd..bd5c7a187f 100644
--- a/activesupport/lib/active_support/core_ext/array/uniq_by.rb
+++ b/activesupport/lib/active_support/core_ext/array/uniq_by.rb
@@ -2,7 +2,7 @@ class Array
# Return an unique array based on the criteria given as a proc.
#
# [1, 2, 3, 4].uniq_by { |i| i.odd? }
- # #=> [1, 2]
+ # # => [1, 2]
#
def uniq_by
hash, array = {}, []
diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb
index d0821a7c68..f76ed401cd 100644
--- a/activesupport/lib/active_support/core_ext/enumerable.rb
+++ b/activesupport/lib/active_support/core_ext/enumerable.rb
@@ -66,7 +66,8 @@ module Enumerable
# +memo+ to the block. Handy for building up hashes or
# reducing collections down to one object. Examples:
#
- # %w(foo bar).each_with_object({}) { |str, hsh| hsh[str] = str.upcase } #=> {'foo' => 'FOO', 'bar' => 'BAR'}
+ # %w(foo bar).each_with_object({}) { |str, hsh| hsh[str] = str.upcase }
+ # # => {'foo' => 'FOO', 'bar' => 'BAR'}
#
# *Note* that you can't use immutable objects like numbers, true or false as
# the memo. You would think the following returns 120, but since the memo is
diff --git a/activesupport/lib/active_support/core_ext/string/multibyte.rb b/activesupport/lib/active_support/core_ext/string/multibyte.rb
index 16ccd36458..0b974f5e0a 100644
--- a/activesupport/lib/active_support/core_ext/string/multibyte.rb
+++ b/activesupport/lib/active_support/core_ext/string/multibyte.rb
@@ -12,11 +12,11 @@ class String
# class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsuled string.
#
# name = 'Claus Müller'
- # name.reverse #=> "rell??M sualC"
- # name.length #=> 13
+ # name.reverse # => "rell??M sualC"
+ # name.length # => 13
#
- # name.mb_chars.reverse.to_s #=> "rellüM sualC"
- # name.mb_chars.length #=> 12
+ # name.mb_chars.reverse.to_s # => "rellüM sualC"
+ # name.mb_chars.length # => 12
#
# In Ruby 1.9 and newer +mb_chars+ returns +self+ because String is (mostly) encoding aware. This means that
# it becomes easy to run one version of your code on multiple Ruby versions.
@@ -26,7 +26,7 @@ class String
# All the methods on the Chars proxy which normally return a string will return a Chars object. This allows
# method chaining on the result of any of these methods.
#
- # name.mb_chars.reverse.length #=> 12
+ # name.mb_chars.reverse.length # => 12
#
# == Interoperability and configuration
#