mongoid / origin

A Ruby DSL for building MongoDB queries
http://mongoid.org/en/origin/index.html
MIT License
62 stars 29 forks source link

Avoid defining a generic method `Object#regexp?` #116

Closed ryoqun closed 8 years ago

ryoqun commented 8 years ago

Hi, we're stumbled on a nasty problem.

It's turned out that origin's Object#regexp? conflicts with our <OurActiveReocrdModel>#regexp?.

Is it hard to rename it to like Object#__regexp_p__ like other mehotds?

Ref: https://github.com/mongoid/origin/blob/3159bc774c3d3bc66ce9fabfa799d2302ccbbe1d/lib/origin/extensions/object.rb#L149

I know our method name is not good one too...

Thanks!

ryoqun commented 8 years ago

@estolfo ping (sorry to bother you.. I chosen you to mention guessing from the fact that you're the author of the newest commit)

durran commented 8 years ago

Will be addressed in Mongoid 6 with our use of Refinements instead of polluting the global namespace. The WIP pull request is here: https://github.com/mongodb/mongoid/pull/4194

Origin has been pulled back into the core Mongoid repo for this release.