autoargs 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b692c49b540de544d7f3d738aa3187acf9b15026
4
- data.tar.gz: ff8053961c2f3cedd9a0f16fa24feb7b422eb859
3
+ metadata.gz: 502f724729419214c0af5d86d50c6371271b3fde
4
+ data.tar.gz: a338149ff475a7203a1be9204362361ae95371ba
5
5
  SHA512:
6
- metadata.gz: 8f9213af79aa58eac52516eaff977e3dac62825637db6df82f2a2b41cc821ba6d5568367e02c03f455f099fa0fa2b3c9375822385ec2b4648e803353caec6f40
7
- data.tar.gz: 22baba0e680bf8ca688e811709cb6d0ee0a0674c5a0fbabecb8de49fbf528c110b2a1ccb22ae868529122031daaa3f0fc90ab4fab070c53f28dd7fe4d9680d37
6
+ metadata.gz: b1667290d793870b36d116376b7b39393f7adae93c8d18510782c317522f112c6b8c47b02aa8add11d52890376398b4b080754e0ec6fc79571a7789ad616bebf
7
+ data.tar.gz: 4172304bfece8158a3d867af5376a0b70b8a4ae2856091764d03a02fc5b58498a5fa847727ec3542fa94c679c19a0ef32a4a70a3ef581a31a9054dbe8b202c12
@@ -1,5 +1,19 @@
1
+ def self.silently
2
+ begin
3
+ orig_stdout = $stdout.dup
4
+ orig_stderr = $stderr.dup
5
+ $stdout.reopen('/dev/null', 'w')
6
+ $stderr.reopen('/dev/null', 'w')
7
+ r = yield
8
+ ensure
9
+ $stdout.reopen(orig_stdout)
10
+ $stderr.reopen(orig_stderr)
11
+ end
12
+ r
13
+ end
14
+
1
15
  require 'autoargs/version'
2
- require 'parser/current'
16
+ silently { require 'parser/current' } # silence warnings
3
17
 
4
18
  module Autoargs
5
19
  def self.run(method)
@@ -1,3 +1,3 @@
1
1
  module Autoargs
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoargs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wendt