Skip to content

Conversation

@tacticiankerala
Copy link

When I parsed a configuration file, the hash keys and group names where represented as string.
example:

{
  "foo" => "bar",
  "baz" => "quux",
  "123" => "456"
}

But, I think it will be much more convenient to deal with symbols in that case rather than strings.
example:

{
  :foo => "bar",
  :baz => "quux",
  :"123" => "456"
}

Also, I have modified the ability to add value and add group to support the above behavior.

I have added tests for add value and add group behavior and all the tests are passing.

@tacticiankerala
Copy link
Author

The build is failing in Ruby 1.8, JRuby 1.8 and Ree. I will look into the issue.

@tacticiankerala
Copy link
Author

It was failing because in the tests the method 'sort' was used to compare two arrays of groups. But unfortunately ruby 1.8 does not have sort operator implemented on symbols.

I have modified the tests not to use sort operator .

@derks
Copy link
Member

derks commented Mar 13, 2014

I haven't had a chance to test this out yet... however, do your changes continue to support "string" keys? If not, it would completely break backward compatibility which would not be ideal. Appreciate your feedback either way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants