Skip to content

Instantly share code, notes, and snippets.

Created November 15, 2011 00:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save anonymous/1365706 to your computer and use it in GitHub Desktop.
Save anonymous/1365706 to your computer and use it in GitHub Desktop.
diff --git a/kernel/common/marshal.rb b/kernel/common/marshal.rb
index 5b0dc71..f0d1dab 100644
--- a/kernel/common/marshal.rb
+++ b/kernel/common/marshal.rb
@@ -970,7 +970,7 @@ module Marshal
ms.construct
rescue NameError => e
- raise ArgumentError, e.message
+ raise ArgumentError, e.message, e
end
class << self
diff --git a/lib/compiler/compiled_file.rb b/lib/compiler/compiled_file.rb
index 1ca9af3..35e3054 100644
--- a/lib/compiler/compiled_file.rb
+++ b/lib/compiler/compiled_file.rb
@@ -211,7 +211,7 @@ module Rubinius
# Returns the next string in _@data_ including the trailing
# "\n" character.
def next_string
- count = @data.locate "\n", @start
+ count = @data.locate "\n", @start, @size
count = @size unless count
str = String.from_chararray @data, @start, count - @start
@start = count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment