liufengyun / hashdiff

Hashdiff is a ruby library to to compute the smallest difference between two hashes
MIT License
556 stars 63 forks source link

Fix a RuboCop offense #73

Closed koic closed 5 years ago

koic commented 5 years ago

This PR fixes the following RuboCop offense when using Ruby 2.2 or lower.

% bundle exec rake

(snip)

Running RuboCop...
Inspecting 20 files
.............C......
Offenses:
lib/hashdiff/version.rb:4:13: C: Style/MutableConstant: Freeze mutable
objects assigned to constants.
  VERSION = '1.0.0.beta1'
            ^^^^^^^^^^^^^
20 files inspected, 1 offense detected
RuboCop failed!

https://travis-ci.org/liufengyun/hashdiff/builds/546282876

This is a regression by https://github.com/liufengyun/hashdiff/pull/70.

koic commented 5 years ago

There is a proposal #71 to change the supported Ruby versions. This is a patch that maintains support for Ruby 2.2 or lower.