Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2: uninitialized constant AwesomePrint::Formatters::SetFormatter::Set #351

Open
sshaw opened this issue Jan 24, 2019 · 3 comments
Open

Comments

@sshaw
Copy link

sshaw commented Jan 24, 2019

2.0.0.pre2:

~ >ruby -rawesome_print -e'ap({:a => 1})'
/Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/set_formatter.rb:10:in `formattable?': uninitialized constant AwesomePrint::Formatters::SetFormatter::Set (NameError)
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatter.rb:49:in `block in format'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatter.rb:44:in `each'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatter.rb:44:in `format'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/inspector.rb:118:in `unnested'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/inspector.rb:76:in `awesome'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/hash_formatter.rb:96:in `pre_ruby19_syntax'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/hash_formatter.rb:56:in `block (2 levels) in printable_hash'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/indentator.rb:13:in `indent'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/inspector.rb:65:in `increase_indentation'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/base_formatter.rb:80:in `indented'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/hash_formatter.rb:52:in `block in printable_hash'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/hash_formatter.rb:51:in `map!'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/hash_formatter.rb:51:in `printable_hash'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/hash_formatter.rb:40:in `multiline_hash'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatters/hash_formatter.rb:23:in `format'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/formatter.rb:41:in `format'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/inspector.rb:118:in `unnested'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/inspector.rb:76:in `awesome'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/core_ext/kernel.rb:5:in `ai'
	from /Users/sshaw/.rvm/gems/ruby-2.3.7/gems/awesome_print-2.0.0.pre2/lib/awesome_print/core_ext/kernel.rb:15:in `ap'
	from -e:1:in `<main>'
@sshaw
Copy link
Author

sshaw commented Jan 24, 2019

Looks like set_formatter.rb needs to require "set".

@imajes
Copy link
Collaborator

imajes commented Jan 24, 2019

huh that's interesting. what ruby version? I thought set is automatically required.

@sshaw
Copy link
Author

sshaw commented Jan 24, 2019

ruby-2.3.7.

Nothing in stdlib (https://ruby-doc.org/stdlib-2.6/) is automatically required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants