From 89d342e1f5deb6ebfcb3f2f814d5523e2dd49942 Mon Sep 17 00:00:00 2001 From: taichi Date: Wed, 27 Feb 2019 15:37:32 +0900 Subject: [PATCH 1/2] updated before_install script --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 From 17a591f398f22d26beedc22637b19da1440242e3 Mon Sep 17 00:00:00 2001 From: taichi Date: Wed, 27 Feb 2019 16:27:57 +0900 Subject: [PATCH 2/2] Adapt Module#attr_setter to frozen-string-literal (fix #286) --- lib/core/facets/module/attr_setter.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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