Skip to content

Commit

Permalink
Autoload Ruby 2.7 overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Jan 30, 2024
1 parent 3b5a58d commit 3ffa190
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/phlex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module Phlex
autoload :SGML, "phlex/sgml"
autoload :SVG, "phlex/svg"
autoload :Unbuffered, "phlex/unbuffered"
autoload :Overrides, "phlex/overrides"

# Included in all Phlex exceptions allowing you to match any Phlex error.
# @example Rescue any Phlex error:
Expand Down
11 changes: 11 additions & 0 deletions lib/phlex/overrides.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Phlex
module Overrides
module Symbol
module Name
refine(Symbol) { alias_method :name, :to_s }
end
end
end
end
6 changes: 0 additions & 6 deletions lib/phlex/overrides/symbol/name.rb

This file was deleted.

0 comments on commit 3ffa190

Please sign in to comment.