summaryrefslogtreecommitdiff
path: root/lib/net/ssh/ruby_compat.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/ssh/ruby_compat.rb')
-rw-r--r--lib/net/ssh/ruby_compat.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/net/ssh/ruby_compat.rb b/lib/net/ssh/ruby_compat.rb
index 8a1c8f2..cd66c58 100644
--- a/lib/net/ssh/ruby_compat.rb
+++ b/lib/net/ssh/ruby_compat.rb
@@ -5,6 +5,14 @@ class String
def getbyte(index)
self[index]
end
+ def setbyte(index, c)
+ self[index] = c
+ end
+ end
+ if RUBY_VERSION < "1.8.7"
+ def bytesize
+ self.size
+ end
end
end