Module: TomlRB::Dumper::SortFixPatch Private

Defined in:
lib/qonfig/plugins/toml/tomlrb_fixes.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

NOTE:

- dumper sorts settins keys as a collection of string or symbols only
- settings values like { a: 1, 'b' => 2 } will fail on comparison errors (Symbol with String)
- problem is located in TomlRB::Dumper#sort_pairs(hash) method
- problem code: `hash.keys.sort.map` (failed on `.sort` part)
- we can patch this code by explicit `.map(&:to_s)` before `.sort`

Since:

  • 0.12.0