methodfinder 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.markdown +7 -3
  2. data/lib/methodfinder.rb +4 -2
  3. metadata +3 -3
data/README.markdown CHANGED
@@ -20,9 +20,13 @@ Usage
20
20
  Todo
21
21
  ---
22
22
 
23
- * Redirect `stdout` and `stderr` to a StringIO object instead of `/dev/null` unless someone tells me that the latter works on Windows.
24
- * Maybe add some sort of method blacklist so they won’t get tried in the block.
25
- * Package this as a gem.
23
+ * none at the moment
24
+
25
+
26
+ Thanks
27
+ ---
28
+
29
+ * Matthew Lucas for packaging it as a gem.
26
30
 
27
31
  License
28
32
  ---
data/lib/methodfinder.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'stringio'
2
+
1
3
  class MethodFinder
2
4
  ARGS = {
3
5
  :cycle => [1] # prevent cycling forever
@@ -21,8 +23,8 @@ class MethodFinder
21
23
  def self.redirect_streams
22
24
  @orig_stdout = $stdout
23
25
  @orig_stderr = $stderr
24
- $stdout = File.new('/dev/null', 'w')
25
- $stderr = File.new('/dev/null', 'w')
26
+ $stdout = StringIO.new
27
+ $stderr = StringIO.new
26
28
  end
27
29
 
28
30
  def self.restore_streams
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Kohl
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-02-11 00:00:00 +01:00
17
+ date: 2011-03-11 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies: []
20
20