Skip to content

Allow passing strings to #public_constant and #private_constant#3470

Merged
yorickpeterse merged 2 commits into
rubinius:masterfrom
robin850:string-constant-visibility
Jul 18, 2015
Merged

Allow passing strings to #public_constant and #private_constant#3470
yorickpeterse merged 2 commits into
rubinius:masterfrom
robin850:string-constant-visibility

Conversation

@robin850

Copy link
Copy Markdown
Contributor

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 July 18, 2015 23:16
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 July 18, 2015 21:53
@robin850

Copy link
Copy Markdown
Contributor Author

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.

2 participants