lib/sdl4r/sdl_binary.rb in sdl4r-0.9.2 vs lib/sdl4r/sdl_binary.rb in sdl4r-0.9.3
- old
+ new
@@ -1,5 +1,6 @@
+#--
# Simple Declarative Language (SDL) for Ruby
# Copyright 2005 Ikayzo, inc.
#
# This program is free software. You can distribute or modify it under the
# terms of the GNU Lesser General Public License version 2.1 as published by
@@ -10,16 +11,17 @@
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, contact the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#++
module SDL4R
- #
# Represents a binary value.
+ #
# This class was introduced to avoid the confusion between a Ruby String and a binary literal.
#
class SdlBinary
attr_accessor :bytes
@@ -33,12 +35,10 @@
return true if self.equal?(o)
return false if not o.instance_of?(self.class)
return self.bytes == o.bytes
end
- def eql?(o)
- self == o
- end
+ alias_method :eql?, :==
def hash
return bytes.hash
end
\ No newline at end of file