diff --git a/lib/capistrano/dsl/env.rb b/lib/capistrano/dsl/env.rb index 0b086056..53c86620 100644 --- a/lib/capistrano/dsl/env.rb +++ b/lib/capistrano/dsl/env.rb @@ -45,8 +45,11 @@ module Capistrano def release_roles(*names) options = { exclude: :no_release } - options.merge! names.pop if names.last.is_a? Hash - names << options + if names.last.is_a? Hash + names.last.merge(options) + else + names << options + end roles(*names) end