Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix for issue #13 (lots of ruby warnings generated). #21
Many of TTFunk's classes had unused variable assignments. The warnings were bothering me, so I changed all unused variables to underscores, but left a comment above the change outlining what the variable represents. All tests pass for me and the warnings are no longer generated.
I wasn't sure what to do with with the
The code was (
def parse_format! number_of_glyphs = read(2, 'n').first @offsets = read(@number_of_glyphs, "c*") end
I'm guessing the original author intended to set the instance variable
Anyways I just removed the unused variable assignment and kept the read, which should theoretically behave in the same manner.
@jessedoyle I've taken a closer look at this and I'm pretty sure it's a bug. Because the post table format 2.5 was deprecated back in February 2000, I think we may want to just stop supporting it in TTFunk for the moment. This feature probably never worked properly, so I don't think it'd hurt anyone to turn it off entirely. I'll take care of that in a separate commit after merging your code.
Thanks for the great work!