* ext/tk/lib/tk/variable.rb: add TkVariable#+@ and -@ method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2009-10-27 12:22:42 +00:00
parent 121d15ddda
commit aacc33649a
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Tue Oct 27 21:20:35 2009 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk/variable.rb: add TkVariable#+@ and -@ method.
Tue Oct 27 16:36:52 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (chopped_length): get rid of unexpected exception.

View File

@ -1175,6 +1175,13 @@ end
end
end
def +@
self.numeric
end
def -@
-(self.numeric)
end
def &(other)
if other.kind_of?(Array)
self.to_a & other.to_a