summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-11-04 16:21:58 +0100
committerAzul <azul@riseup.net>2012-11-04 16:21:58 +0100
commitbda0084efb0ebadcbe22fb4a91ec925593564e1a (patch)
treef1c49a8b386d94e99f2731fff737f520076a64e2
parent04421b355eb93de2888f12801cc0ebe123414264 (diff)
making byte algo work in 1.9.3 - bumping version
in ruby 1.9.3 string[i] will be a char. Need to call #ord to make sure we have a charcode.
-rw-r--r--lib/srp/util.rb2
-rw-r--r--ruby-srp.gemspec2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/srp/util.rb b/lib/srp/util.rb
index 3bed1d3..9f4cb1b 100644
--- a/lib/srp/util.rb
+++ b/lib/srp/util.rb
@@ -70,7 +70,7 @@ d15dc7d7b46154d6b6ce8ef4ad69b15d4982559b297bcf1885c529f566660e5
a = [a].pack('H*')
b = [b].pack('H*')
a.bytes.each_with_index.map do |a_byte, i|
- (a_byte ^ (b[i] || 0)).chr
+ (a_byte ^ (b[i].ord || 0)).chr
end.join
end
diff --git a/ruby-srp.gemspec b/ruby-srp.gemspec
index 9f39071..32d9e2a 100644
--- a/ruby-srp.gemspec
+++ b/ruby-srp.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "ruby-srp"
- s.version = "0.1.3"
+ s.version = "0.1.4"
s.platform = Gem::Platform::RUBY
s.authors = ["Azul"]
s.email = ["azul@leap.se"]