tins 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -24,6 +24,7 @@ module Tins
24
24
  # An option hash is returned with all found options set to true or the
25
25
  # found option argument.
26
26
  def go(s, args = ARGV)
27
+ args = args.map(&:dup)
27
28
  b, v = s.scan(/(.)(:?)/).inject([ {}, {} ]) { |t, (o, a)|
28
29
  a = a == ':'
29
30
  t[a ? 1 : 0][o] = a ? nil : false
@@ -1,6 +1,6 @@
1
1
  module Tins
2
2
  # Tins version
3
- VERSION = '0.4.0'
3
+ VERSION = '0.4.1'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -32,5 +32,13 @@ module Tins
32
32
  assert_equal({ 'a' => 2, 'b' => 'hello' }, r)
33
33
  assert_equal %w[hello world], r['b'].to_a
34
34
  end
35
+
36
+ def test_complex_frozen
37
+ args = %w[-b hello -aa -b world -c]
38
+ args = args.map(&:freeze)
39
+ r = go 'ab:', args
40
+ assert_equal({ 'a' => 2, 'b' => 'hello' }, r)
41
+ assert_equal %w[hello world], r['b'].to_a
42
+ end
35
43
  end
36
44
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "tins"
5
- s.version = "0.4.0"
5
+ s.version = "0.4.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Florian Frank"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -351,7 +351,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
351
351
  version: '0'
352
352
  segments:
353
353
  - 0
354
- hash: -1325111411765569981
354
+ hash: 4100283347471528269
355
355
  required_rubygems_version: !ruby/object:Gem::Requirement
356
356
  none: false
357
357
  requirements: