seattlerb/ruby_parser — Issue #18: Constant re-initialization warning w/ R2R 1.3.1
Author: neilconway
Created: 2011-10-08 21:58:10+00:00
State: open

Test case:

```ruby
require 'rubygems'
require 'ruby2ruby'
require 'ruby_parser'

puts "ruby2ruby: #{Ruby2Ruby::VERSION}"
puts "ruby_parser: #{RubyParser::VERSION}"
```

Outputs:

```
/Users/neilc/.rvm/gems/ruby-1.8.7-p352/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10: warning: already initialized constant ENC_NONE
/Users/neilc/.rvm/gems/ruby-1.8.7-p352/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11: warning: already initialized constant ENC_EUC
/Users/neilc/.rvm/gems/ruby-1.8.7-p352/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12: warning: already initialized constant ENC_SJIS
/Users/neilc/.rvm/gems/ruby-1.8.7-p352/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13: warning: already initialized constant ENC_UTF8
ruby2ruby: 1.3.1
ruby_parser: 2.3.1
```

No warning is emitted if you require `ruby_parser` before `ruby2ruby` or if you use Ruby2Ruby 1.3.0.