class String def [] (*params) if params.all? { |p| Integer===p } || params.size==1 && Range===params[0] res = self.unpack("U*").[](*params) res = [res] unless Array===res return res.pack("U*") end super end end
You need to create an account or log in to post comments to this site.