rudionrails / yell

Yell - Your Extensible Logging Library
MIT License
311 stars 21 forks source link

Exception when using custom format with a frozen string #50

Closed CHTJonas closed 5 years ago

CHTJonas commented 5 years ago

Hi 👋 love the gem! However adding # frozen_string_literal: true to the Rails initialiser that I have for Yell-related raises a FrozenError on runtime. The following seems to reproduce the issue with any modern Ruby version:

Yell.new(format: '%d %p : %m'.freeze)

This is the line of code that appears to be the issue: https://github.com/rudionrails/yell/blob/5fd63238e66df204df77e27f2d943b3a0df0e0dd/lib/yell/formatter.rb#L169

rudionrails commented 5 years ago

Hi @CHTJonas, sorry for the late reply. I just fixed the issue and published a new gem version: https://rubygems.org/gems/yell/versions/2.1.0

CHTJonas commented 5 years ago

Fab thanks @rudionrails!