diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-05-29 15:04:31 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-05-29 15:04:45 +0900 |
commit | 1a0c3d8dd64eb90f5d74e68458d686c4f9cc1669 (patch) | |
tree | f721d226c7f8cb7bbf9a51a36a04c50da8adb5df /tool | |
parent | 5379ca92501c529005c0818f3cbbd1ef0798de6d (diff) | |
download | ruby-1a0c3d8dd64eb90f5d74e68458d686c4f9cc1669.tar.gz |
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')
-rw-r--r-- | tool/vcs.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb index ecb313d58d..808b28344e 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 |