summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXabier de Zuazo <xabier@onddo.com>2014-11-27 23:06:34 +0100
committerLamont Granquist <lamont@scriptkiddie.org>2015-01-27 12:02:43 -0800
commit48916743c66ea57443533ca574da09c19ecc45b9 (patch)
tree2dcab0e51de9e658c15582469ed3dce35d2063d7
parentd728f5b8d8179bd81b2ff44ef8ddae89e573bebe (diff)
downloadchef-48916743c66ea57443533ca574da09c19ecc45b9.tar.gz
Remove some RUBY_VERSION < 2 comparisons (ruby < 2 specific, issue #2497)
-rw-r--r--lib/chef/mixin/command/windows.rb6
-rw-r--r--lib/chef/util/path_helper.rb3
2 files changed, 1 insertions, 8 deletions
diff --git a/lib/chef/mixin/command/windows.rb b/lib/chef/mixin/command/windows.rb
index e3d0cfdb18..0147d58039 100644
--- a/lib/chef/mixin/command/windows.rb
+++ b/lib/chef/mixin/command/windows.rb
@@ -18,11 +18,7 @@
# limitations under the License.
#
-if RUBY_VERSION =~ /^1\.8/
- require 'win32/open3'
-else
- require 'open3'
-end
+require 'open3'
class Chef
module Mixin
diff --git a/lib/chef/util/path_helper.rb b/lib/chef/util/path_helper.rb
index 26c9c76fe5..a5485a864b 100644
--- a/lib/chef/util/path_helper.rb
+++ b/lib/chef/util/path_helper.rb
@@ -101,9 +101,6 @@ class Chef
# Produces a comparable path.
def self.canonical_path(path, add_prefix=true)
- # Rather than find an equivalent for File.absolute_path on 1.8.7, just bail out
- raise NotImplementedError, "This feature is not supported on Ruby versions < 1.9" if RUBY_VERSION.to_f < 1.9
-
# First remove extra separators and resolve any relative paths
abs_path = File.absolute_path(path)