summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-24 06:35:04 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-24 06:35:04 +0000
commit53a606a549850ce52384955fcd3a4eaa98d2d919 (patch)
treecab4d5030382ac3ac0509606fe4aea3fd8d37c04
parent43b2144254a6cdc2e583e1041ba6eb9b42c9efaa (diff)
* tool/vcs.rb (IO.popen): Enable on Ruby 1.9 where chdir option is not
supported on IO.popen * tool/vcs.rb (IO.popen): Fix NoMethodError. I guess r49705 was not tested... :/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--tool/vcs.rb6
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f4da7923a..807a04a07f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Dec 24 14:44:08 2015 sorah (Shota Fukumori) <her@sorah.jp>
+
+ * tool/vcs.rb (IO.popen): Enable on Ruby 1.9 where chdir option is not
+ supported on IO.popen
+
+ * tool/vcs.rb (IO.popen): Fix NoMethodError. I guess r49705 was not
+ tested... :/
+
Thu Dec 24 14:57:03 2015 Koichi Sasada <ko1@atdot.net>
* NEWS: rename
diff --git a/tool/vcs.rb b/tool/vcs.rb
index e38d1cfc56..92ae46f443 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -15,7 +15,7 @@ def IO.pread(*args)
popen(*args) {|f|f.read}
end
-if RUBY_VERSION < "1.9"
+if RUBY_VERSION < "2.0"
class IO
@orig_popen = method(:popen)
@@ -23,7 +23,7 @@ if RUBY_VERSION < "1.9"
def self.popen(command, *rest, &block)
if Hash === (opts = rest[-1])
dir = opts.delete(:chdir)
- rest pop if opts.empty?
+ rest.pop if opts.empty?
end
if block
@orig_popen.call("-", *rest) do |f|
@@ -48,7 +48,7 @@ if RUBY_VERSION < "1.9"
def self.popen(command, *rest, &block)
if Hash === (opts = rest[-1])
dir = opts.delete(:chdir)
- rest pop if opts.empty?
+ rest.pop if opts.empty?
end
command = command.shelljoin if Array === command
Dir.chdir(dir || ".") do