Skip to content

Commit

Permalink
require pathname stdlib
Browse files Browse the repository at this point in the history
`Hashie::Mash.load` require `Pathname` since v3.4.5.

see: bbafade

```
irb(main):001:0> require "hashie"
=> true
irb(main):002:0> Hashie::Mash.load("foo.yml")
Traceback (most recent call last):
        6: from /opt/rubies/2.6.0-dev/bin/irb:11:in `<main>'
        5: from (irb):3
        4: from /Users/onaka/.gem/ruby/2.6.0/gems/hashie-3.5.7/lib/hashie/mash.rb:105:in `load'
        3: from /Users/onaka/.gem/ruby/2.6.0/gems/hashie-3.5.7/lib/hashie/extensions/parsers/yaml_erb_parser.rb:19:in `perform'
        2: from /Users/onaka/.gem/ruby/2.6.0/gems/hashie-3.5.7/lib/hashie/extensions/parsers/yaml_erb_parser.rb:19:in `new'
        1: from /Users/onaka/.gem/ruby/2.6.0/gems/hashie-3.5.7/lib/hashie/extensions/parsers/yaml_erb_parser.rb:9:in `initialize'
NameError (uninitialized constant Hashie::Extensions::Parsers::YamlErbParser::Pathname)
irb(main):003:0> require "pathname"
=> true
irb(main):004:0> Hashie::Mash.load("foo.yml")
=> #<Hashie::Mash bar="baz">
```
  • Loading branch information
onk committed Feb 6, 2018
1 parent 3c6149c commit 6d55d56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/hashie/extensions/parsers/yaml_erb_parser.rb
@@ -1,5 +1,6 @@
require 'yaml'
require 'erb'
require 'pathname'
module Hashie
module Extensions
module Parsers
Expand Down

0 comments on commit 6d55d56

Please sign in to comment.