summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-05-29 15:04:31 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-05-29 15:04:45 +0900
commit1a0c3d8dd64eb90f5d74e68458d686c4f9cc1669 (patch)
treef721d226c7f8cb7bbf9a51a36a04c50da8adb5df /tool/vcs.rb
parent5379ca92501c529005c0818f3cbbd1ef0798de6d (diff)
Convert Enumerator to Array for Ruby 1.9.3
String#lines seems to return Enumerator in Ruby 1.9.3, and it does not respond to #delete_if https://travis-ci.org/ruby/ruby/jobs/538559919
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index ecb313d..808b283 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -407,7 +407,7 @@ class VCS
modified = log[/^Date:\s+(.*)/, 1]
branch = cmd_read_at(srcdir, [gitcmd + %W[symbolic-ref --short HEAD]])
if branch.empty?
- branch_list = cmd_read_at(srcdir, [gitcmd + %W[branch --list --contains HEAD]]).lines
+ branch_list = cmd_read_at(srcdir, [gitcmd + %W[branch --list --contains HEAD]]).lines.to_a
branch_list.delete_if {|b| /detached at/ =~ b}
(branch = branch_list[0]).strip! unless branch_list.empty?
end