Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 331_new_feature
* master: Fix support for Array#dig Preparing for the next development iteration, 3.4.5. Preparing for release, 3.4.4. Omit `return' Fix too fexible regex Refactor IgnoreUndeclared#initialize_attributes. Stringified translations wasn't working in IgnoreUndeclared. Convert Mash keys for #dig README: fix typo Update the change log format Fix `#merge` breaking indifferent access Fix build: ignore rbx-2 failures and add ruby 2.3.0. README: Clarified IndifferentAccess docs
- Loading branch information
Showing
20 changed files
with
503 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Hashie | ||
class Array < ::Array | ||
include Hashie::Extensions::Array::PrettyInspect | ||
include Hashie::Extensions::RubyVersionCheck | ||
with_minimum_ruby('2.3.0') do | ||
def dig(*indexes) | ||
super(*indexes.map { |idx| Integer(idx) }) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Hashie | ||
module Extensions | ||
module Array | ||
module PrettyInspect | ||
def self.included(base) | ||
base.send :alias_method, :array_inspect, :inspect | ||
base.send :alias_method, :inspect, :hashie_inspect | ||
end | ||
|
||
def hashie_inspect | ||
ret = "#<#{self.class} [" | ||
ret << to_a.map(&:inspect).join(', ') | ||
ret << ']>' | ||
ret | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Hashie | ||
module Extensions | ||
module RubyVersionCheck | ||
def self.included(base) | ||
base.extend ClassMethods | ||
end | ||
|
||
module ClassMethods | ||
def with_minimum_ruby(version) | ||
yield if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new(version) | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.