Author: kclark
Date: Tue Jun 17 18:11:41 2008
New Revision: 668972
URL: http://svn.apache.org/viewvc?rev=668972&view=rev
Log:
Strip the rest of the empty () parens
Modified:
incubator/thrift/trunk/lib/rb/lib/thrift/client.rb
incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb
incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb
incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb
incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb
Modified: incubator/thrift/trunk/lib/rb/lib/thrift/client.rb
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/client.rb?rev=668972&r1=668971&r2=668972&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/client.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/client.rb Tue Jun 17 18:11:41 2008
@@ -13,24 +13,24 @@
data.send("#{k.to_s}=", v)
end
data.write(@oprot)
- @oprot.write_message_end()
- @oprot.trans.flush()
+ @oprot.write_message_end
+ @oprot.trans.flush
end
def receive_message(result_klass)
- fname, mtype, rseqid = @iprot.read_message_begin()
+ fname, mtype, rseqid = @iprot.read_message_begin
handle_exception(mtype)
result = result_klass.new
result.read(@iprot)
- @iprot.read_message_end()
+ @iprot.read_message_end
return result
end
def handle_exception(mtype)
if mtype == MessageTypes::EXCEPTION
- x = ApplicationException.new()
+ x = ApplicationException.new
x.read(@iprot)
- @iprot.read_message_end()
+ @iprot.read_message_end
raise x
end
end
Modified: incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb?rev=668972&r1=668971&r2=668972&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/exceptions.rb Tue Jun 17 18:11:41
2008
@@ -26,30 +26,30 @@
end
def read(iprot)
- iprot.read_struct_begin()
+ iprot.read_struct_begin
while true
- fname, ftype, fid = iprot.read_field_begin()
+ fname, ftype, fid = iprot.read_field_begin
if (ftype === Types::STOP)
break
end
if (fid == 1)
if (ftype === Types::STRING)
- @message = iprot.read_string();
+ @message = iprot.read_string;
else
iprot.skip(ftype)
end
elsif (fid == 2)
if (ftype === Types::I32)
- @type = iprot.read_i32();
+ @type = iprot.read_i32;
else
iprot.skip(ftype)
end
else
iprot.skip(ftype)
end
- iprot.read_field_end()
+ iprot.read_field_end
end
- iprot.read_struct_end()
+ iprot.read_struct_end
end
def write(oprot)
@@ -57,15 +57,15 @@
if (@message != nil)
oprot.write_field_begin('message', Types::STRING, 1)
oprot.write_string(@message)
- oprot.write_field_end()
+ oprot.write_field_end
end
if (@type != nil)
oprot.write_field_begin('type', Types::I32, 2)
oprot.write_i32(@type)
- oprot.write_field_end()
+ oprot.write_field_end
end
- oprot.write_field_stop()
- oprot.write_struct_end()
+ oprot.write_field_stop
+ oprot.write_struct_end
end
end
Modified: incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb?rev=668972&r1=668971&r2=668972&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/processor.rb Tue Jun 17 18:11:41
2008
@@ -5,18 +5,18 @@
end
def process(iprot, oprot)
- name, type, seqid = iprot.read_message_begin()
+ name, type, seqid = iprot.read_message_begin
if respond_to?("process_#{name}")
send("process_#{name}", seqid, iprot, oprot)
return true
else
iprot.skip(Types::STRUCT)
- iprot.read_message_end()
+ iprot.read_message_end
x = ApplicationException.new(ApplicationException::UNKNOWN_METHOD,
'Unknown function '+name)
oprot.write_message_begin(name, MessageTypes::EXCEPTION, seqid)
x.write(oprot)
- oprot.write_message_end()
- oprot.trans.flush()
+ oprot.write_message_end
+ oprot.trans.flush
return
end
end
@@ -31,8 +31,8 @@
def write_result(result, oprot, name, seqid)
oprot.write_message_begin(name, MessageTypes::REPLY, seqid)
result.write(oprot)
- oprot.write_message_end()
- oprot.trans.flush()
+ oprot.write_message_end
+ oprot.trans.flush
end
end
deprecate_module! :TProcessor => Processor
Modified: incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb?rev=668972&r1=668971&r2=668972&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb Tue Jun 17 18:11:41 2008
@@ -19,14 +19,14 @@
end
def read(iprot)
- iprot.read_struct_begin()
+ iprot.read_struct_begin
loop do
- fname, ftype, fid = iprot.read_field_begin()
+ fname, ftype, fid = iprot.read_field_begin
break if (ftype === Types::STOP)
handle_message(iprot, fid, ftype)
- iprot.read_field_end()
+ iprot.read_field_end
end
- iprot.read_struct_end()
+ iprot.read_struct_end
end
def write(oprot)
@@ -42,8 +42,8 @@
end
end
end
- oprot.write_field_stop()
- oprot.write_struct_end()
+ oprot.write_field_stop
+ oprot.write_struct_end
end
def ==(other)
Modified: incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb?rev=668972&r1=668971&r2=668972&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/transport/socket.rb Tue Jun 17
18:11:41 2008
@@ -23,7 +23,7 @@
@handle = handle
end
- def open()
+ def open
begin
@handle = TCPSocket.new(@host, @port)
rescue StandardError
@@ -31,7 +31,7 @@
end
end
- def open?()
+ def open?
return [EMAIL PROTECTED]
end
@@ -55,8 +55,8 @@
end
end
- def close()
- @handle.close() unless @handle.nil?
+ def close
+ @handle.close unless @handle.nil?
@handle = nil
end
end
@@ -68,22 +68,22 @@
@handle = nil
end
- def listen()
+ def listen
@handle = TCPServer.new(nil, @port)
end
- def accept()
+ def accept
if (@handle != nil)
- sock = @handle.accept()
- trans = Socket.new()
+ sock = @handle.accept
+ trans = Socket.new
trans.set_handle(sock)
return trans
end
return nil
end
- def close()
- @handle.close() unless @handle.nil?
+ def close
+ @handle.close unless @handle.nil?
end
end
deprecate_class! :TServerSocket => ServerSocket