diff --git a/.travis.yml b/.travis.yml index a2c4714b..fe4306dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,12 @@ language: ruby sudo: false before_install: - - gem update --system + - "if $(ruby -e 'exit(RUBY_VERSION >= \"2.3.0\")'); then gem update --system; fi" + - "if $(ruby -e 'exit(RUBY_VERSION < \"2.3.0\")'); then gem update --system 2.7.8; fi" # bundler installation needed for jruby-head # https://github.com/travis-ci/travis-ci/issues/5861 - - gem install bundler + - "if $(ruby -e 'exit(RUBY_VERSION >= \"2.3.0\")'); then gem install bundler; fi" + - "if $(ruby -e 'exit(RUBY_VERSION < \"2.3.0\")'); then gem install bundler --version 1.17.3; fi" script: "bundle exec rubytest -Ilib test/ --verbose" bundler_args: --without guard diff --git a/lib/core/facets/module/attr_setter.rb b/lib/core/facets/module/attr_setter.rb index 9d517f56..857379b9 100644 --- a/lib/core/facets/module/attr_setter.rb +++ b/lib/core/facets/module/attr_setter.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Module # Create an attribute method for both getting @@ -19,7 +20,7 @@ class Module # CREDIT: Trans def attr_setter(*args) - code, made = '', [] + code, made = [], [] args.each do |a| code << %{ def #{a}(*args) @@ -28,7 +29,7 @@ def #{a}(*args) } made << "#{a}".to_sym end - module_eval code + module_eval code.join made end