Skip to content

Commit 3c4b77e

Browse files
authored
Revert "Added alias to_h for to_hash (#277)" (#295)
This reverts commit 4b65ca6
1 parent 2cc5b86 commit 3c4b77e

3 files changed

Lines changed: 1 addition & 12 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Bug fixes
66

7-
...
7+
* Revert added alias to_h for to_hash ([#277](https://github.com/railsconfig/config/issues/277))
88

99
### Changes
1010

lib/config/options.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ def to_hash
123123
result
124124
end
125125

126-
alias :to_h :to_hash
127-
128126
def each(*args, &block)
129127
marshal_dump.each(*args, &block)
130128
end

spec/config_spec.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,6 @@
8080
expect(config[:section][:servers][1]).to be_kind_of(Config::Options)
8181
end
8282

83-
it "should convert to a hash without modifying nested settings" do
84-
config = Config.load_files("#{fixture_path}/development.yml")
85-
config.to_h
86-
expect(config).to be_kind_of(Config::Options)
87-
expect(config[:section]).to be_kind_of(Config::Options)
88-
expect(config[:section][:servers][0]).to be_kind_of(Config::Options)
89-
expect(config[:section][:servers][1]).to be_kind_of(Config::Options)
90-
end
91-
9283
it "should convert to a json" do
9384
config = Config.load_files("#{fixture_path}/development.yml").to_json
9485
expect(JSON.parse(config)["section"]["servers"]).to be_kind_of(Array)

0 commit comments

Comments
 (0)