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 passing strings to #public_constant and #private_constant #3470

Merged
merged 2 commits into from Jul 18, 2015
Merged

Allow passing strings to #public_constant and #private_constant #3470

merged 2 commits into from Jul 18, 2015

Conversation

robin850
Copy link
Contributor

@robin850 robin850 commented Jul 18, 2015

Hello,

This is a tiny patch that makes #private_constant and #public_constant accept strings as arguments. The maintained constants table is dealing with symbols but these methods can take strings ; it's pretty common to pass class.name as an argument.

MRI is doing the symbol conversion even though the documentation sets "symbol" as the given argument.

The Active Record test suite doesn't run at all on Rubinius since has_and_belongs_to_many relies on this.

Have a nice day.

robin850 added 2 commits Jul 18, 2015
The maintained constants table is dealing with symbols but these methods
can take strings as arguments ; it's pretty common to pass `class.name`
as an argument.
@YorickPeterse YorickPeterse merged commit ce1791f into rubinius:master Jul 18, 2015
@robin850 robin850 deleted the string-constant-visibility branch Jul 18, 2015
@robin850
Copy link
Contributor Author

robin850 commented Jul 18, 2015

Thanks!

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.

None yet

2 participants