backports 2.6.0 → 2.6.1

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.
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 2
3
3
  :minor: 6
4
- :patch: 0
4
+ :patch: 1
5
5
  :build:
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "backports"
8
- s.version = "2.6.0"
8
+ s.version = "2.6.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marc-Andr\u{e9} Lafortune"]
12
- s.date = "2012-05-30"
12
+ s.date = "2012-05-31"
13
13
  s.description = " Essential backports that enable some of the really nice features of ruby 1.8.7, ruby 1.9 and rails from ruby 1.8.6 and earlier.\n"
14
14
  s.email = "github@marc-andre.ca"
15
15
  s.extra_rdoc_files = [
@@ -1,11 +1,20 @@
1
1
  class Dir
2
- Backports.make_block_optional self, :each, :test_on => Dir.new(".")
2
+ begin
3
+ Backports.make_block_optional self, :each, :test_on => Dir.new('.')
4
+ rescue # We may not be able to read the current directory, issue #58
5
+ Backports.make_block_optional self, :each, :force => true if RUBY_VERSION < '1.8.7'
6
+ end
7
+
3
8
  class << self
4
- Backports.make_block_optional self, :foreach, :test_on => Dir, :arg => "."
5
-
9
+ begin
10
+ Backports.make_block_optional self, :foreach, :test_on => Dir, :arg => '.'
11
+ rescue # We may not be able to read the current directory, issue #58
12
+ Backports.make_block_optional self, :foreach, :force => true if RUBY_VERSION < '1.8.7'
13
+ end
14
+
6
15
  def mktmpdir(prefix_suffix=nil, tmpdir=nil)
7
16
  raise NoMethodError, "undefined method `mktmpdir' for Dir:Class; you must require 'tmpdir'" unless respond_to? :tmpdir
8
-
17
+
9
18
  case prefix_suffix
10
19
  when nil
11
20
  prefix = "d"
@@ -43,7 +52,7 @@ class Dir
43
52
  path
44
53
  end
45
54
  end unless method_defined? :mktmpdir
46
-
55
+
47
56
  end
48
57
  end
49
-
58
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backports
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-30 00:00:00.000000000 Z
12
+ date: 2012-05-31 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! ' Essential backports that enable some of the really nice features
15
15
  of ruby 1.8.7, ruby 1.9 and rails from ruby 1.8.6 and earlier.