Skip to content

Commit

Permalink
encoding an empty string should return the empty set
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Jan 4, 2009
1 parent 3a7f718 commit 10dae44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ttfunk/subset_collection.rb
Expand Up @@ -38,6 +38,8 @@ def use(characters)
# and so may not look (in the raw) like what was passed in, but
# they will render correctly with the indicated subset font.
def encode(characters)
return [] if characters.empty?

# TODO: probably would be more optimal to nix the #use method,
# and merge it into this one, so it can be done in a single
# pass instead of two passes.
Expand Down

0 comments on commit 10dae44

Please sign in to comment.