Commit 4b8f3ae44e26fa4b81895fe7a24d4b9e9435e71e

Authored by Diego Araújo
1 parent 6e9330a4
Exists in colab and in 2 other branches master, stable

Fix HeaderUtils to support ruby version on CentOS 7

Apparently, the ruby 2.0.0-p598 (CentOS 7 default) breaks with the code
we were using. This commit replace it with a different syntax that
should be reverted when CentOS 7 updates its ruby.
Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
features/support/header.rb
@@ -10,6 +10,9 @@ module HeaderUtils @@ -10,6 +10,9 @@ module HeaderUtils
10 end 10 end
11 11
12 def set_headers(headers) 12 def set_headers(headers)
13 - headers.each(&method(:set_header)) 13 + # The call 'headers.each(&method(:set_header))' breaks on ruby 2.0.0-p598, which is the
  14 + # default version on CentOS 7. When that SO updates ruby, this should be reverted to
  15 + # the more concise syntax.
  16 + headers.each { |key, value| method(:set_header).call(key, value) }
14 end 17 end
15 end 18 end