frc-frecon / frecon

An API for building scouting apps for FRC competitions
MIT License
3 stars 0 forks source link

Use File.class_eval instead of repeating calls to File class methods. #30

Closed rye closed 9 years ago

rye commented 9 years ago

Saying File. a lot is non-DRY-compliant. I think it's better to use class_eval.

(From 682655e269b1c7101e31c11e5c45374fed93b2b4):

I'm unaware of the internals of Matz's Ruby implementation (which is what we're all using), but I think there's a bit of optimization in place to make this change a bit more negligible. However, this makes a bit more sense to me.

Sammidysam commented 9 years ago

I'm generally not a fan of code within a string. I don't feel like DRY extends to calling class methods. So I'm not sure if I like this or not. :/

rye commented 9 years ago

Hmm. While I agree about the code within a string thing, I do think it'd be good to not call File.<method> repetitively.

rye commented 9 years ago

I will create the release for v0.1.1 without this request merged, and then we can merge it later in another patch release.

Sammidysam commented 9 years ago

Since this is irrelevant to how stuff works, you can merge it. I don't really love it, but I don't hate it enough for it to warrant me delaying stuff.

rye commented 9 years ago

Okay.

rye commented 9 years ago

Merging into master, will release v0.1.1 after that.