Skip to content

Commit

Permalink
Fix frozen string literal
Browse files Browse the repository at this point in the history
- Warning for ruby 3.5
- Simplify version.rb
  • Loading branch information
robertcheramy committed Feb 18, 2025
1 parent 87269cb commit 41f5c7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/oxidized/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

module Oxidized
VERSION = '0.32.0'.freeze
VERSION_FULL = '0.32.0'.freeze
VERSION = '0.32.0'
VERSION_FULL = '0.32.0-3-g87269cba'
def self.version_set
version_full = %x(git describe --tags).chop rescue ""
version = %x(git describe --tags --abbrev=0).chop rescue ""
Expand All @@ -12,8 +14,8 @@ def self.version_set
const_set(:VERSION, version)
const_set(:VERSION_FULL, version_full)
file = File.readlines(__FILE__)
file[1] = " VERSION = '%s'.freeze\n" % VERSION
file[2] = " VERSION_FULL = '%s'.freeze\n" % VERSION_FULL
file[3] = " VERSION = '%s'\n" % VERSION
file[4] = " VERSION_FULL = '%s'\n" % VERSION_FULL
File.write(__FILE__, file.join)
end
end
2 changes: 2 additions & 0 deletions lib/refinements.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Refinements
# Use the 'refine' keyword to define refinements for the String class
refine String do
Expand Down

0 comments on commit 41f5c7c

Please sign in to comment.