diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-03 15:44:13 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-03 15:44:13 +0900 |
| commit | 896c1312311a15518218d0c50f7c7921b7983e1a (patch) | |
| tree | e382dcc40e72487da6352e158d7162b0e7896f6e | |
| parent | 6e94f9bb302e9cbfb1d599ffc64f0496c666ac4f (diff) | |
| parent | 85ed19ca4da194d48f27bb06d1eacccf9f877d58 (diff) | |
| download | mruby-896c1312311a15518218d0c50f7c7921b7983e1a.tar.gz mruby-896c1312311a15518218d0c50f7c7921b7983e1a.zip | |
Merge pull request #2346 from suzukaze/add-string-comment2
Fix indent in String#casecmp comments
| -rw-r--r-- | mrbgems/mruby-string-ext/mrblib/string.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mrbgems/mruby-string-ext/mrblib/string.rb b/mrbgems/mruby-string-ext/mrblib/string.rb index 18a7a62d3..a08fc0f46 100644 --- a/mrbgems/mruby-string-ext/mrblib/string.rb +++ b/mrbgems/mruby-string-ext/mrblib/string.rb @@ -94,16 +94,17 @@ class String (s == self) ? nil : self.replace(s) end -# call-seq: -# str.casecmp(other_str) -> -1, 0, +1 or nil -# -# Case-insensitive version of <code>String#<=></code>. -# -# "abcdef".casecmp("abcde") #=> 1 -# "aBcDeF".casecmp("abcdef") #=> 0 -# "abcdef".casecmp("abcdefg") #=> -1 -# "abcdef".casecmp("ABCDEF") #=> 0 -# + ## + # call-seq: + # str.casecmp(other_str) -> -1, 0, +1 or nil + # + # Case-insensitive version of <code>String#<=></code>. + # + # "abcdef".casecmp("abcde") #=> 1 + # "aBcDeF".casecmp("abcdef") #=> 0 + # "abcdef".casecmp("abcdefg") #=> -1 + # "abcdef".casecmp("ABCDEF") #=> 0 + # def casecmp(str) self.downcase <=> str.to_str.downcase rescue NoMethodError |
