rogerdpack-sane 0.1.6 → 0.1.7

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.
Files changed (2) hide show
  1. data/lib/sane.rb +8 -2
  2. metadata +1 -1
data/lib/sane.rb CHANGED
@@ -12,7 +12,7 @@ class File
12
12
  # CREDIT: facets/Gavin Sinclair
13
13
 
14
14
  def self.write(path, data)
15
- File.open(path, "wb") do |file|
15
+ File.open(path, "w") do |file|
16
16
  return file.write(data)
17
17
  end
18
18
  end unless self.respond_to?(:write)
@@ -23,6 +23,12 @@ class File
23
23
  end
24
24
  end unless self.respond_to?(:binread)
25
25
 
26
+ def self.binwrite(path, data)
27
+ File.open(path, "wb") do |file|
28
+ return file.write(data)
29
+ end
30
+ end
31
+
26
32
  end
27
33
 
28
34
  class Object
@@ -61,7 +67,7 @@ class Object
61
67
  puts
62
68
  end
63
69
 
64
- def aliaz hash
70
+ def alias_h hash
65
71
  hash.each_pair {|new, old|
66
72
  alias_method new, old
67
73
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rogerdpack-sane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roger Pack