8000 Protect "unqualified_name" from name collision · Issue #15 · danielwellman/bane · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Protect "unqualified_name" from name collision #15
Open
@danielwellman

Description

@danielwellman

extensions.rb defines the method unqualified_name on the Class object. In insolation, this is fine, however if Bane is used by other libraries (say, in integration tests) this method name might clash with another implementation of unqualified_name. In particular, I'm concerned about ActiveSupport which is widely used.

To use a name which might be more familiar to ActiveSupport, we could define

class.demodulize_name

(which would be defined on Module)

This uses a name which is probably familiar to anyone who uses ActiveSupport, since it has a 'demodulize' method on String.

As a bonus, 'demodulize_name' is also unused in ActiveSupport -- and didn't turn up any Google search results when we looked today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0