hamster 0.2.11 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ === 0.2.12 / 2010-03-01
2
+
3
+ * Fixed bug: List#join accidentally modifying head if it was a string.
4
+
1
5
  === 0.2.11 / 2010-02-15
2
6
 
3
7
  * Implement Set#one?
@@ -284,7 +284,7 @@ module Hamster
284
284
  def join(sep = "")
285
285
  return "" if empty?
286
286
  sep = sep.to_s
287
- tail.reduce(head.to_s) { |string, item| string << sep << item.to_s }
287
+ tail.reduce(head.to_s.dup) { |result, item| result << sep << item.to_s }
288
288
  end
289
289
 
290
290
  def intersperse(sep)
@@ -1,5 +1,5 @@
1
1
  module Hamster
2
2
 
3
- VERSION = "0.2.11".freeze
3
+ VERSION = "0.2.12".freeze
4
4
 
5
5
  end
@@ -29,8 +29,12 @@ describe Hamster::List do
29
29
  describe "on #{values.inspect}" do
30
30
 
31
31
  before do
32
- original = Hamster.list(*values)
33
- @result = original.join("|")
32
+ @original = Hamster.list(*values)
33
+ @result = @original.join("|")
34
+ end
35
+
36
+ it "preserves the original" do
37
+ @original.should == Hamster.list(*values)
34
38
  end
35
39
 
36
40
  it "returns #{expected.inspect}" do
@@ -54,8 +58,12 @@ describe Hamster::List do
54
58
  describe "on #{values.inspect}" do
55
59
 
56
60
  before do
57
- original = Hamster.list(*values)
58
- @result = original.join
61
+ @original = Hamster.list(*values)
62
+ @result = @original.join
63
+ end
64
+
65
+ it "preserves the original" do
66
+ @original.should == Hamster.list(*values)
59
67
  end
60
68
 
61
69
  it "returns #{expected.inspect}" do
@@ -17,8 +17,12 @@ describe Hamster::Set do
17
17
  describe "on #{values.inspect}" do
18
18
 
19
19
  before do
20
- original = Hamster.set(*values)
21
- @result = original.join("|")
20
+ @original = Hamster.set(*values)
21
+ @result = @original.join("|")
22
+ end
23
+
24
+ it "preserves the original" do
25
+ @original.should == Hamster.set(*values)
22
26
  end
23
27
 
24
28
  it "returns #{expected.inspect}" do
@@ -42,8 +46,12 @@ describe Hamster::Set do
42
46
  describe "on #{values.inspect}" do
43
47
 
44
48
  before do
45
- original = Hamster.set(*values)
46
- @result = original.join
49
+ @original = Hamster.set(*values)
50
+ @result = @original.join
51
+ end
52
+
53
+ it "preserves the original" do
54
+ @original.should == Hamster.set(*values)
47
55
  end
48
56
 
49
57
  it "returns #{expected.inspect}" do
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 12
9
+ version: 0.2.12
5
10
  platform: ruby
6
11
  authors:
7
12
  - Simon Harris
@@ -9,29 +14,37 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-02-15 00:00:00 +11:00
17
+ date: 2010-03-01 00:00:00 +11:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rspec
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 2
30
+ - 9
23
31
  version: 1.2.9
24
- version:
32
+ type: :development
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: diff-lcs
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 1
43
+ - 1
44
+ - 2
33
45
  version: 1.1.2
34
- version:
46
+ type: :development
47
+ version_requirements: *id002
35
48
  description: Efficient, Immutable, Thread-Safe Collection classes for Ruby
36
49
  email: haruki.zaemon@gmail.com
37
50
  executables: []
@@ -230,18 +243,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
243
  requirements:
231
244
  - - ">="
232
245
  - !ruby/object:Gem::Version
246
+ segments:
247
+ - 1
248
+ - 8
249
+ - 7
233
250
  version: 1.8.7
234
- version:
235
251
  required_rubygems_version: !ruby/object:Gem::Requirement
236
252
  requirements:
237
253
  - - ">="
238
254
  - !ruby/object:Gem::Version
255
+ segments:
256
+ - 0
239
257
  version: "0"
240
- version:
241
258
  requirements: []
242
259
 
243
260
  rubyforge_project:
244
- rubygems_version: 1.3.5
261
+ rubygems_version: 1.3.6
245
262
  signing_key:
246
263
  specification_version: 3
247
264
  summary: Efficient, Immutable, Thread-Safe Collection classes for Ruby