Skip to content

Instantly share code, notes, and snippets.

@nahi
Created October 29, 2011 23:46
Show Gist options
  • Save nahi/1325253 to your computer and use it in GitHub Desktop.
Save nahi/1325253 to your computer and use it in GitHub Desktop.
Long String in initial line causes VM aborting? (1000 vs 10000, existence of "\n" at initial line)
% jruby165 -e 'File.open("longstr.rb", "w") { |f| f << "str = %q(" << ("0" * 1000) << ")\np :sleep\n" }' && jruby165 longstr.rb
:sleep
% jruby165 -e 'File.open("longstr.rb", "w") { |f| f << "str = %q(" << ("0" * 10000) << ")\np :sleep\n" }' && jruby165 longstr.rb
% jruby165 -e 'File.open("longstr.rb", "w") { |f| f << "\n" << "str = %q(" << ("0" * 10000) << ")\np :sleep\n" }' && jruby165 longstr.rb
:sleep
%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment