From: Kevin Clark Date: Wed, 18 Jun 2008 00:58:58 +0000 (+0000) Subject: Add comment and convert super(args)->super X-Git-Tag: 0.2.0~630 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=e12b0f8445b00e6d0584b4aabf3e84fdaebbef07;p=common%2Fthrift.git Add comment and convert super(args)->super git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668919 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/lib/thrift/deprecation.rb b/lib/rb/lib/thrift/deprecation.rb index b3fd12e5..e170f57f 100644 --- a/lib/rb/lib/thrift/deprecation.rb +++ b/lib/rb/lib/thrift/deprecation.rb @@ -10,6 +10,10 @@ class Module # Wraps the given methods to print a warning and call the real method # Example: # deprecate! :readAll => :read_all + #-- + # Yeah, this is ugly, passing a string to module_eval, but unfortunately + # using a block removes the ability to pass blocks to the defined method + # and breaks spec def deprecate!(methods) return unless Thrift::DEPRECATION methods.each_pair do |old, new| diff --git a/lib/rb/lib/thrift/exceptions.rb b/lib/rb/lib/thrift/exceptions.rb index efaa805a..4dddce0e 100644 --- a/lib/rb/lib/thrift/exceptions.rb +++ b/lib/rb/lib/thrift/exceptions.rb @@ -1,7 +1,7 @@ module Thrift class Exception < StandardError def initialize(message) - super(message) + super @message = message end @@ -21,7 +21,7 @@ module Thrift attr_reader :type def initialize(type=UNKNOWN, message=nil) - super(message) + super @type = type end