Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to init Saxerator::Builder::HashElement without arguments #28

Merged
merged 1 commit into from
Feb 2, 2015
Merged

Allow to init Saxerator::Builder::HashElement without arguments #28

merged 1 commit into from
Feb 2, 2015

Conversation

exAspArk
Copy link
Contributor

Hi,

There is a rare case with serialize method from ActiveRecord.
When I'm trying to use Saxerator::Builder::HashElement through this serialization it raises an error about wrong number of arguments (0 for 2).

Can we save the same initialize method's behavior as a behavior of parent class?
To be able to use Saxerator::Builder::HashElement.new like Hash.new

soulcutter added a commit that referenced this pull request Feb 2, 2015
Allow to init Saxerator::Builder::HashElement without arguments
@soulcutter soulcutter merged commit d0b6dbe into soulcutter:master Feb 2, 2015
@soulcutter
Copy link
Owner

I suspect that this will not be needed later on when we stop subclassing Hash - I'm not sure that even this patch it going to be fully satisfying.

@soulcutter
Copy link
Owner

Also worth noting that the params you pass into this object have different meaning than what you'd pass into a Hash

@exAspArk
Copy link
Contributor Author

exAspArk commented Feb 2, 2015

@soulcutter thank you.
Yes, I agree with you and think that it's better to stop subclassing Hash.

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