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 b3fd12e..e170f57 100644
--- a/lib/rb/lib/thrift/deprecation.rb
+++ b/lib/rb/lib/thrift/deprecation.rb
@@ -10,6 +10,10 @@
# 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 efaa805..4dddce0 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 @@
attr_reader :type
def initialize(type=UNKNOWN, message=nil)
- super(message)
+ super
@type = type
end