* file.c: fix indent style. [fix GH-977]

* test/ruby/test_string.rb: indent. [fix GH-975]
[ci skip] These patches are contributed from @yui-knk

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2015-10-23 07:03:34 +00:00
parent 26cd2da784
commit 5fdee2f829
3 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,9 @@
Fri Oct 23 16:03:26 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* file.c: fix indent style. [fix GH-977]
* test/ruby/test_string.rb: indent. [fix GH-975]
[ci skip] These patches are contributed from @yui-knk
Fri Oct 23 15:46:09 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org> Fri Oct 23 15:46:09 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* string.c: Added method signature to include hash. It's inconsistency * string.c: Added method signature to include hash. It's inconsistency

2
file.c
View File

@ -4259,7 +4259,7 @@ ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
* File.extname("test.rb") #=> ".rb" * File.extname("test.rb") #=> ".rb"
* File.extname("a/b/d/test.rb") #=> ".rb" * File.extname("a/b/d/test.rb") #=> ".rb"
* File.extname(".a/b/d/test.rb") #=> ".rb" * File.extname(".a/b/d/test.rb") #=> ".rb"
* File.extname("foo.") #=> "" * File.extname("foo.") #=> ""
* File.extname("test") #=> "" * File.extname("test") #=> ""
* File.extname(".profile") #=> "" * File.extname(".profile") #=> ""
* File.extname(".profile.sh") #=> ".sh" * File.extname(".profile.sh") #=> ".sh"

View File

@ -281,10 +281,10 @@ class TestString < Test::Unit::TestCase
def casetest(a, b, rev=false) def casetest(a, b, rev=false)
msg = proc {"#{a} should#{' not' if rev} match #{b}"} msg = proc {"#{a} should#{' not' if rev} match #{b}"}
case a case a
when b when b
assert(!rev, msg) assert(!rev, msg)
else else
assert(rev, msg) assert(rev, msg)
end end
end end