Skip to content

Commit

Permalink
Fixed #583 -- Added Symbol#empty?
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaynor committed Apr 10, 2013
1 parent 68a1590 commit 422e17d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions spec/tags/core/symbol/empty_tags.txt

This file was deleted.

4 changes: 4 additions & 0 deletions topaz/objects/symbolobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def method_inspect(self, space):
def method_size(self, space):
return space.newint(len(self.symbol))

@classdef.method("empty?")
def method_emptyp(self, space):
return space.newbool(not self.symbol)

@classdef.method("<=>")
def method_comparator(self, space, w_other):
if not space.is_kind_of(w_other, space.w_symbol):
Expand Down

0 comments on commit 422e17d

Please sign in to comment.