optbind 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a837c816cfde5f3f0f1f388665eba0a110c672c
4
- data.tar.gz: 41dde907c99ff3df7ec9df5935fdb51e21e07a8c
3
+ metadata.gz: 194d33bd932477ac7d450cc566424f849b34a198
4
+ data.tar.gz: 66a5246dab6f09d49045990eef6599b7a4a38fb7
5
5
  SHA512:
6
- metadata.gz: 928ffd6eb566a87a156fb234e016e7c43a7169be771a9f9f184f79b639dfa03b6eeecbec74ac243db7c500c4c40cdd2deaf9ed03c319a4b3dbe497595e659a44
7
- data.tar.gz: d1e08e5b6331d233bea8e5feaa28672ce213e048cdaea0207de88404614aeea80ce724f5aca71cdf78b40a00bca34cdb32e2131e3f3e0f40575dd2f23ae5281c
6
+ metadata.gz: 7a97b83b47f41d650ebfb865bf051df3309bcd6396d983034630a4969c331e4dc603ab4d9ff01bc9135f6dc67d32ebbfd77635b9b155828097bccf5d0ad4e505
7
+ data.tar.gz: 6132c445ebe256c2e4669b449b69a2ddeae29306102ddbb1d6348f22971c8daabc253fbe4e7166401faf6d453297e33b105dde45184acc204fd647a296127cd4
@@ -1,3 +1,3 @@
1
1
  module OptBind
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
data/lib/optbind.rb CHANGED
@@ -74,7 +74,7 @@ class OptionBinder
74
74
  @parser.abort "missing argument: #{a}=" if !r || (r.respond_to?(:empty?) && r.empty?)
75
75
  end
76
76
 
77
- (handler || -> (_) { r }).call(r == nil ? default : r).tap { |x| @writer.call variable, x if bound }
77
+ (handler || -> (x) { x }).call(r == nil ? default : r).tap { |x| @writer.call variable, x if bound }
78
78
  end
79
79
 
80
80
  (@bound_variables_with_defaults ||= {})[variable] = default if bound
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optbind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavol Zbell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-09 00:00:00.000000000 Z
11
+ date: 2016-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec