Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Fix 0 and 0px to match and resolve as a redundancy#42

Closed
mduvall wants to merge 4 commits intozmoazeni:masterfrom
mduvall:master
Closed

Fix 0 and 0px to match and resolve as a redundancy#42
mduvall wants to merge 4 commits intozmoazeni:masterfrom
mduvall:master

Conversation

@mduvall
Copy link

@mduvall mduvall commented Apr 12, 2013

Fixes #32

@zmoazeni
Copy link
Owner

Nice! Thanks!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this logic is the only thing I don't love about this implementation. This logic could be pushed into the instance methods of the class. Perhaps only in the equality check.

@zmoazeni
Copy link
Owner

@mduvall Let me know if you want to finish this out with my comment above. Otherwise I can take it. I like the rest of the code and especially appreciate the tests.

Could you also update the CHANGELOG and the CONTRIBUTORS?

You can add a new ## (Unreleased) ## block in the Changelog.

@mduvall
Copy link
Author

mduvall commented Apr 12, 2013

@zmoazeni I'll definitely finish this out tonight, thanks for the feedback! 👍

@mduvall
Copy link
Author

mduvall commented Apr 12, 2013

@zmoazeni I updated the code to make the function an instance method, this had the nice convenience of only doing the normalization for the parser equality in hash.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit is redundant. Because of from_parser

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yeah - removed it since the strip is done there

@zmoazeni
Copy link
Owner

Some edgecasey tests here would go a long way too.

Thanks for all the work on this!

CONTRIBUTORS.md Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo? :)

I should have said, you don't have to put your info in here if you rather not. I just like to have some credit where credit is due.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops x 2, put my Twitter handle here, fixed

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I don't care either way. It's attributing you, so do what you want :)

Sent from my iPhone

On Apr 12, 2013, at 7:52 PM, Matt DuVall notifications@github.com wrote:

In CONTRIBUTORS.md:

@@ -1,3 +1,4 @@


Reply to this email directly or view it on GitHub.

@mduvall
Copy link
Author

mduvall commented Apr 13, 2013

@zmoazeni I added some base case tests in types_test.rb - let me know if there is anything else!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add % here. I was thinking of moving this check in the normalize method.

@zmoazeni
Copy link
Owner

@mduvall This is really close. I'm going to pull this down and make some tweaks then merge it in.

Thanks for all the hard work!

zmoazeni added a commit that referenced this pull request Apr 13, 2013
@zmoazeni
Copy link
Owner

@mduvall I'm going to go ahead and close this. I cherry-picked the majority of this code and tweaked a bit in d5ba00f

Thanks again for the help!

@zmoazeni zmoazeni closed this Apr 13, 2013
zmoazeni added a commit that referenced this pull request Apr 14, 2013
Not sure if it's due to constructing the array and calling #hash on it
or what, but the previous implementation is terrible on performance

refs: #42, #32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 without units issue

2 participants