Skip to content

Commit

Permalink
Merge commit 'jedediah/master'
Browse files Browse the repository at this point in the history
* commit 'jedediah/master':
  Ruby 1.9 fixes

Conflicts:
	.gitignore
  • Loading branch information
mvidner committed Aug 27, 2009
2 parents 68d5927 + dede316 commit 2b6b608
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/dbus/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def authenticate
# obtain for "1000" => 31303030 This is what the server is expecting.
# Why? I dunno. How did I come to that conclusion? by looking at rbus
# code. I have no idea how he found that out.
return Process.uid.to_s.split(//).collect { |a| "%x" % a[0] }.join
return Process.uid.to_s.split(//).collect { |a| "%x" % a[0].ord }.join
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/dbus/marshall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_string
ret = @buffy.slice(@idx, str_sz)
raise IncompleteBufferException if @idx + str_sz + 1 > @buffy.size
@idx += str_sz
if @buffy[@idx] != 0
if @buffy[@idx].ord != 0
raise InvalidPacketException, "String is not nul-terminated"
end
@idx += 1
Expand All @@ -124,7 +124,7 @@ def get_signature
ret = @buffy.slice(@idx, str_sz)
raise IncompleteBufferException if @idx + str_sz + 1 >= @buffy.size
@idx += str_sz
if @buffy[@idx] != 0
if @buffy[@idx].ord != 0
raise InvalidPacketException, "Type is not nul-terminated"
end
@idx += 1
Expand Down

0 comments on commit 2b6b608

Please sign in to comment.