lib/rserve/rexp/genericvector.rb in rserve-client-0.1.7 vs lib/rserve/rexp/genericvector.rb in rserve-client-0.1.8
- old
+ new
@@ -3,10 +3,10 @@
class GenericVector < REXP::Vector
attr_reader :payload
def initialize(list, attr=nil)
super(attr)
@payload=list.nil? ? Rlist.new() : list
- if (payload.named?)
+ if (attr.nil? and payload.named? )
@attr = REXP::List.new(
Rlist.new([REXP::String.new(payload.keys())],
["names"]));
end
end