Namespace core_ext #98

Merged
merged 1 commit into from Jan 19, 2012

Projects

None yet

2 participants

@RichGuk
RichGuk commented Jan 19, 2012

Moving core_ext to within the squeel directory, to namespace it. There is a chance of conflicting paths with core_ext, which would either cause squeel core_ext not to load or the other core_ext not to load.

For example in our application we have Rails.root/lib as part of the autoload path and have a core_ext/hash for Hash within. Upon app boot we load load core_ext/hash before squeel has required core_ext/hash, so I assume ruby thinks the file has already loaded? This prevents the Hash extensions of squeel loading.

Namespacing the core_ext for the gem fixes this, similar to how ActiveSupport, jekyll and thor's core_ext are within the directory.

@RichGuk RichGuk Moved core_ext to within squeel namespace.
There is a rare chance of conflicting paths with just core_ext/hash; this can
prevent squeel core extensions from be loaded, or prevent others from being
loaded.
35204ba
@ernie
Member
ernie commented Jan 19, 2012

This seems fine. Thanks!

@ernie ernie merged commit 6eaf342 into activerecord-hackery:master Jan 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment