Skip to content

Commit

Permalink
Use dig_rb instead of ruby_dig when backport_dig is not installed
Browse files Browse the repository at this point in the history
Because ruby_dig 0.0.2 does not support a object that responds to dig
method properly. On the other hand, dig_rb 1.0.1 supports it properly.
  • Loading branch information
okkez committed Dec 18, 2017
1 parent 97c8c24 commit a6b4ac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fluentd.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency("tzinfo", ["~> 1.0"])
gem.add_runtime_dependency("tzinfo-data", ["~> 1.0"])
gem.add_runtime_dependency("strptime", ["~> 0.1"])
gem.add_runtime_dependency("ruby_dig", ["~> 0.0.2"])
gem.add_runtime_dependency("dig_rb", ["~> 1.0.0"])

# build gem for a certain platform. see also Rakefile
fake_platform = ENV['GEM_BUILD_FAKE_PLATFORM'].to_s
Expand Down
4 changes: 2 additions & 2 deletions lib/fluent/plugin_helper/record_accessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
require 'fluent/config/error'
unless {}.respond_to?(:dig)
begin
# backport_dig is faster than ruby_dig so prefer backport_dig.
# backport_dig is faster than dig_rb so prefer backport_dig.
require 'backport_dig'
rescue LoadError
require 'ruby_dig'
require 'dig_rb'
end
end

Expand Down

0 comments on commit a6b4ac8

Please sign in to comment.