diff --git a/lib/dbf/column.rb b/lib/dbf/column.rb index 4017478f..b4e890ef 100644 --- a/lib/dbf/column.rb +++ b/lib/dbf/column.rb @@ -21,6 +21,7 @@ class NameError < StandardError G: ColumnType::General } TYPE_CAST_CLASS.default = ColumnType::String + TYPE_CAST_CLASS.freeze # Initialize a new DBF::Column # diff --git a/lib/dbf/column_type.rb b/lib/dbf/column_type.rb index 9dfae8bb..66cedbe9 100644 --- a/lib/dbf/column_type.rb +++ b/lib/dbf/column_type.rb @@ -4,7 +4,7 @@ class Base ENCODING_ARGS = [ Encoding.default_external, {undef: :replace, invalid: :replace} - ] + ].freeze attr_reader :decimal, :encoding diff --git a/lib/dbf/encodings.rb b/lib/dbf/encodings.rb index 58d7aa27..040b2540 100644 --- a/lib/dbf/encodings.rb +++ b/lib/dbf/encodings.rb @@ -58,6 +58,6 @@ module DBF 'c9' => 'cp1251', # Russian Windows 'ca' => 'cp1254', # Turkish Windows 'cb' => 'cp1253', # Greek Windows - 'cc' => 'cp1257', # Baltic Windows - } + 'cc' => 'cp1257' # Baltic Windows + }.freeze end