From 1bdb1c2e8894b938fe83057fe04a27315bad08d0 Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Tue, 8 Jan 2019 20:59:38 +0100 Subject: [PATCH 1/3] Fix example in TreeRewriter documentation The #rewrite method takes at least two arguments: A buffer and an AST. --- lib/parser/tree_rewriter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/parser/tree_rewriter.rb b/lib/parser/tree_rewriter.rb index 4b0c071d5..60ffacedb 100644 --- a/lib/parser/tree_rewriter.rb +++ b/lib/parser/tree_rewriter.rb @@ -27,12 +27,13 @@ module Parser # end # EOF # + # ast = Parser::CurrentRuby.parse code # buffer = Parser::Source::Buffer.new('(example)') # buffer.source = code # rewriter = RemoveDo.new # # # Rewrite the AST, returns a String with the new form. - # puts rewriter.rewrite(buffer) + # puts rewriter.rewrite(buffer, ast) # # This would result in the following Ruby code: # From a1a21e2e805fa06ab384ea1fc6d92fef66b1d6f6 Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Tue, 8 Jan 2019 21:55:19 +0100 Subject: [PATCH 2/3] Install compatible version of Bundler on Travis CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f79d59cfd..e5d43d917 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,6 @@ matrix: - rvm: rbx-2 - script: ./ci/run_rubocop_specs before_install: - - gem install bundler + - gem install bundler -v '< 2' - bundle --version - gem --version From 9c34ef304daf8861aa7e8c6791708ef76b80f5e0 Mon Sep 17 00:00:00 2001 From: Keiji Yoshimi Date: Sat, 8 Dec 2018 15:29:52 +0900 Subject: [PATCH 3/3] Relax bundler dev dependency to allow bundler v2.0.0.pre2 --- parser.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.gemspec b/parser.gemspec index 06104d4ca..603eec8c4 100644 --- a/parser.gemspec +++ b/parser.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'ast', '~> 2.4.0' - spec.add_development_dependency 'bundler', '~> 1.15' + spec.add_development_dependency 'bundler', '>= 1.15', '< 3.0.0' spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'racc', '= 1.4.14' spec.add_development_dependency 'cliver', '~> 0.3.2'