string_case_pl 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -48,8 +48,7 @@ class String
48
48
 
49
49
  def capitalize!
50
50
  old = self.dup
51
- self[0] = self[0].upcase
52
- self[1..-1] = self[1..-1].downcase
51
+ self[0..-1] = self.capitalize
53
52
  self unless old == self
54
53
  end
55
54
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "string_case_pl"
3
- s.version = "0.0.4"
3
+ s.version = "0.0.5"
4
4
  s.date = "2009-12-27"
5
5
  s.summary = "Additional support for Polish encodings in Ruby 1.9"
6
6
  s.email = "apohllo@o2.pl"
@@ -51,4 +51,10 @@ class TestCharacterCaseChange < Test::Unit::TestCase
51
51
  assert_equal(@iso_capitalized, @iso_lower.capitalize)
52
52
  end
53
53
 
54
+ def test_capitalize!
55
+ d = @utf_lower.dup
56
+ assert_equal(d.capitalize!, @utf_capitalized)
57
+ assert_equal(d.capitalize!, nil)
58
+ end
59
+
54
60
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Aleksander Pohl