Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ruby 2.5 support #268

Merged
merged 1 commit into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ruby-2.5, ruby-2.6, ruby-2.7, ruby-3.0]
ruby: [ruby-2.6, ruby-2.7, ruby-3.0]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand All @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ruby-2.5, ruby-2.6, ruby-2.7, ruby-3.0]
ruby: [ruby-2.6, ruby-2.7, ruby-3.0]
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand All @@ -54,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ruby-2.5, ruby-2.6, ruby-2.7, ruby-3.0]
ruby: [ruby-2.6, ruby-2.7, ruby-3.0]
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand All @@ -70,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ruby-2.5, ruby-2.6, ruby-2.7, ruby-3.0]
ruby: [ruby-2.6, ruby-2.7, ruby-3.0]
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 8 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# v0.6.0 unreleased
# v0.6.1 unreleased

[245](https://github.com/mbj/unparser/pull/245)
[#268](https://github.com/mbj/unparser/pull/268)

* Remove ruby 2.5 support since its EOL.

# v0.6.0 2021-01-06

[#245](https://github.com/mbj/unparser/pull/245)

* Change to raise Unparser::InvalidNode error in some cases when unparsing invalid AST.
* Change `Unparser.unparse` into an official public API.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following constraints apply:

* No support for macruby extensions
* Only support for the [modern AST](https://github.com/whitequark/parser/#usage) format
* Only support for Ruby >= 2.5
* Only support for Ruby >= 2.6

Notable Users:

Expand Down Expand Up @@ -110,7 +110,7 @@ If you need to generate Ruby Syntax outside of this band feel free to contact me
Testing:
--------

Unparser currently successfully round trips almost all ruby code around. Using MRI-2.5.x.
Unparser currently successfully round trips almost all ruby code around. Using Ruby >= 2.6.
If there is a non round trippable example that is NOT subjected to known [Limitations](#limitations).
please report a bug.

Expand Down
4 changes: 2 additions & 2 deletions lib/unparser/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def content
# @api private
#
def capture_content
size_before = @content.size
size_before = content.size
yield
@content[size_before..-1]
content[size_before..]
end

# Write raw fragment to buffer
Expand Down
2 changes: 1 addition & 1 deletion lib/unparser/emitter/hash_pattern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def emit_pair(node)
end

def write_symbol_body(symbol)
write(symbol.inspect[1..-1])
write(symbol.inspect[1..])
end
end # Pin
end # Emitter
Expand Down
2 changes: 1 addition & 1 deletion lib/unparser/node_details/send.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def assignment?
memoize :assignment?

def arguments
children[2..-1]
children[2..]
end
memoize :arguments

Expand Down
2 changes: 1 addition & 1 deletion test/run-parser-tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Test
:rubies
)

TARGET_RUBIES = %w[2.5 2.6 2.7]
TARGET_RUBIES = %w[2.6 2.7]

EXPECT_FAILURE = {}.freeze

Expand Down
2 changes: 1 addition & 1 deletion unparser.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
gem.extra_rdoc_files = %w[README.md]
gem.executables = %w[unparser]

gem.required_ruby_version = '>= 2.5'
gem.required_ruby_version = '>= 2.6'

gem.add_dependency('diff-lcs', '~> 1.3')
gem.add_dependency('parser', '>= 3.0.0')
Expand Down