From e12b0f8445b00e6d0584b4aabf3e84fdaebbef07 Mon Sep 17 00:00:00 2001 From: Kevin Clark Date: Wed, 18 Jun 2008 00:58:58 +0000 Subject: [PATCH] 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 --- lib/rb/lib/thrift/deprecation.rb | 4 ++++ lib/rb/lib/thrift/exceptions.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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 -- 2.17.1