rogdl 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/string.rb +1 -1
  2. data/test/test_string.rb +9 -0
  3. metadata +1 -1
data/lib/string.rb CHANGED
@@ -7,7 +7,7 @@ class String
7
7
  alias cc camel_case
8
8
 
9
9
  def upper_camel_case
10
- str = self
10
+ str = String.new(self)
11
11
 
12
12
  str.downcase!
13
13
  str.gsub!(/-/,"_")
data/test/test_string.rb CHANGED
@@ -19,6 +19,10 @@ class TestString < Test::Unit::TestCase
19
19
 
20
20
  assert_equal 'ldap', 'LDAP'.camel_case
21
21
  assert_equal 'ldapName', 'LDAP Name'.camel_case
22
+
23
+ s = 'some text'
24
+ s.camel_case
25
+ assert_equal 'some text', s
22
26
  end
23
27
 
24
28
  def test_alias
@@ -38,6 +42,11 @@ class TestString < Test::Unit::TestCase
38
42
 
39
43
  assert_equal 'Ldap', 'LDAP'.upper_camel_case
40
44
  assert_equal 'LdapName', 'LDAP Name'.upper_camel_case
45
+
46
+ s = 'some text'
47
+ s.upper_camel_case
48
+ assert_equal 'some text', s
49
+
41
50
  end
42
51
 
43
52
 
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: rogdl
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.1
6
+ version: 0.2.2
7
7
  date: 2007-08-22 00:00:00 -05:00
8
8
  summary: Rogdl is a package for parsing OGDL files.
9
9
  require_paths: