Skip to content

Instantly share code, notes, and snippets.

@claudiob
Created October 19, 2016 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claudiob/43cc7fe77ff95951538af2825a71e5ec to your computer and use it in GitHub Desktop.
Save claudiob/43cc7fe77ff95951538af2825a71e5ec to your computer and use it in GitHub Desktop.
Rails issue: missing require
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
end
require 'active_support'
require 'active_support/hash_with_indifferent_access'
require 'minitest/autorun'
class BugTest < Minitest::Test
def test_nested_hash
hwia = HashWithIndifferentAccess.new
hwia[:nested_hash] = {a: 1}
# the line above raises
# NoMethodError: undefined method `nested_under_indifferent_access' for {:a=>1}:Hash
# ../bundler/gems/rails-125ecfbbff33/activesupport/lib/active_support/hash_with_indifferent_access.rb:291:in `convert_value'
# ../bundler/gems/rails-125ecfbbff33/activesupport/lib/active_support/hash_with_indifferent_access.rb:104:in `[]='
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment