Skip to content

Instantly share code, notes, and snippets.

@cheald
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cheald/f501486d3f4ea82fb4ab to your computer and use it in GitHub Desktop.
Save cheald/f501486d3f4ea82fb4ab to your computer and use it in GitHub Desktop.
chris@luna ~apache/repos/jruby (test-load-fixes) $ irb
jruby-head :001 > require 'json/ext'
=> true
jruby-head :002 > require 'json/ext/parser'
=> false
jruby-head :003 > JSON::Ext::Parser
=> JSON::Ext::Parser
jruby-head :004 > require 'active_support/all'
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/values/time_zone.rb:37: warning: already initialized constant MAPPING
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/values/time_zone.rb:189: warning: already initialized constant UTC_OFFSET_WITH_COLON
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/values/time_zone.rb:190: warning: already initialized constant UTC_OFFSET_WITHOUT_COLON
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext/string/output_safety.rb:7: warning: already initialized constant HTML_ESCAPE
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext/string/output_safety.rb:8: warning: already initialized constant JSON_ESCAPE
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext/string/output_safety.rb:9: warning: already initialized constant HTML_ESCAPE_REGEXP
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext/string/output_safety.rb:10: warning: already initialized constant HTML_ESCAPE_ONCE_REGEXP
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext/string/output_safety.rb:11: warning: already initialized constant JSON_ESCAPE_REGEXP
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext/string/output_safety.rb:133: warning: already initialized constant UNSAFE_STRING_METHODS
=> true
jruby-head :005 >
chris@luna ~apache/repos/jruby (test-load-fixes) $ irb
jruby-head :001 > require 'active_support/all'
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/values/time_zone.rb:37: warning: already initialized constant MAPPING
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/values/time_zone.rb:189: warning: already initialized constant UTC_OFFSET_WITH_COLON
/usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/values/time_zone.rb:190: warning: already initialized constant UTC_OFFSET_WITHOUT_COLON
NameError: uninitialized constant JSON::Ext::Parser
from org/jruby/RubyModule.java:3103:in `const_missing'
from /usr/local/rvm/gems/jruby-head/gems/json-1.8.2-java/lib/json/ext.rb:16:in `<module:Ext>'
from /usr/local/rvm/gems/jruby-head/gems/json-1.8.2-java/lib/json/ext.rb:12:in `<module:JSON>'
from /usr/local/rvm/gems/jruby-head/gems/json-1.8.2-java/lib/json/ext.rb:9:in `<top>'
from org/jruby/RubyKernel.java:966:in `require'
from /usr/local/rvm/rubies/jruby-head/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:69:in `require'
from /usr/local/rvm/gems/jruby-head/gems/json-1.8.2-java/lib/json.rb:1:in `<module:(root)>'
from /usr/local/rvm/gems/jruby-head/gems/json-1.8.2-java/lib/json.rb:58:in `<top>'
from org/jruby/RubyKernel.java:966:in `require'
from /usr/local/rvm/rubies/jruby-head/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:69:in `require'
from /usr/local/rvm/gems/jruby-head/gems/json-1.8.2-java/lib/json.rb:54:in `<top>'
from org/jruby/RubyKernel.java:966:in `require'
from /usr/local/rvm/rubies/jruby-head/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:69:in `require'
from /usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext/object/json.rb:1:in `<top>'
from org/jruby/RubyKernel.java:966:in `require'
from /usr/local/rvm/rubies/jruby-head/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:121:in `require'
... 4 levels...
from /usr/local/rvm/rubies/jruby-head/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:69:in `require'
from /usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext/object.rb:12:in `<top>'
from org/jruby/RubyKernel.java:966:in `require'
from /usr/local/rvm/rubies/jruby-head/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:128:in `require'
from /usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext.rb:1:in `<eval>'
from org/jruby/RubyKernel.java:1005:in `eval'
from /usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext.rb:2:in `(root)'
from /usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/core_ext.rb:1:in `(root)'
from /usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/all.rb:1:in `block in (root)'
from /usr/local/rvm/gems/jruby-head/gems/activesupport-4.2.1/lib/active_support/all.rb:3:in `(root)'
from (irb):1:in `block in (root)'
from (irb):1:in `block in evaluate'
from org/jruby/RubyKernel.java:1315:in `loop'
from org/jruby/RubyKernel.java:1125:in `catch'
from org/jruby/RubyKernel.java:1125:in `catch'
from /usr/local/rvm/rubies/jruby-head/bin/irb:13:in `<top>'jruby-head :002 >
if ENV['SIMPLECOV_COVERAGE'].to_i == 1
require 'simplecov'
SimpleCov.start do
add_filter "/tests/"
end
end
require 'json/common'
module JSON
# This module holds all the modules/classes that implement JSON's
# functionality as C extensions.
module Ext
require 'json/ext/parser'
require 'json/ext/generator'
$DEBUG and warn "Using Ext extension for JSON."
JSON.parser = Parser
JSON.generator = Generator
end
JSON_LOADED = true unless defined?(::JSON::JSON_LOADED)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment