Skip to content

Commit

Permalink
🐛 Make changelog.rake compatible with ruby 2.7
Browse files Browse the repository at this point in the history
Oops.  We'll drop ruby 2.7 soon.  Until then, let's stay compatible.
  • Loading branch information
nevans committed May 1, 2024
1 parent 5aca66b commit aa41143
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rakelib/changelog.rake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ task "changelog:generate" do
releases = JSON.parse(release_json)
entries = releases.map {|release|
release.transform_keys!(&:to_sym)
release => {name:, tag_name:, created_at:, body:}
# release => {name:, tag_name:, created_at:, body:} # ruby 3.0
case release; in name:, tag_name:, created_at:, body:; nil end # ruby 2.7
url = "https://github.com/ruby/net-imap/tree/#{tag_name}"
date = created_at[0, 10]
body = body.delete("\r").gsub(/^#/, "##")
Expand Down

0 comments on commit aa41143

Please sign in to comment.