Skip to content

require rainbow/ext/string - #3

Open
leoj3n wants to merge 1 commit into
lfcipriani:masterfrom
leoj3n:require-rainbow-ext-string
Open

leoj3n wants to merge 1 commit into
lfcipriani:masterfrom
leoj3n:require-rainbow-ext-string

Conversation

@leoj3n

@leoj3n leoj3n commented Apr 25, 2014

Copy link
Copy Markdown

Referenced from the "String mixin" section @ http://rubydoc.info/gems/rainbow/2.0.0/frames

@lfcipriani

Copy link
Copy Markdown
Owner

Hi Leo,

Sorry, I won't merge since I don't agree that a library/gem should add methods to String, this could generate unexpected behaivor in software that depends in a way from this gem.

@leoj3n

leoj3n commented Apr 28, 2014

Copy link
Copy Markdown
Author

Without require 'rainbow/ext/string' I get errors:

/Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/cheatorious-0.4.1/lib/cheatorious/writer/text.rb:45:in `section_start': undefined method `foreground' for "#":String (NoMethodError)
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/cheatorious-0.4.1/lib/cheatorious/search.rb:86:in `block in write_contents'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/cheatorious-0.4.1/lib/cheatorious/search.rb:80:in `each'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/cheatorious-0.4.1/lib/cheatorious/search.rb:80:in `write_contents'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/cheatorious-0.4.1/lib/cheatorious/search.rb:29:in `execute'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/cheatorious-0.4.1/lib/cheatorious/search.rb:7:in `execute'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/cheatorious-0.4.1/lib/cheatorious/cli.rb:60:in `search'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/gems/cheatorious-0.4.1/bin/cheatorious:5:in `<top (required)>'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/bin/cheatorious:23:in `load'
    from /Users/leoj/.rvm/gems/ruby-2.0.0-p247/bin/cheatorious:23:in `<main>'

Because of the methods being used in https://github.com/lfcipriani/cheatorious/blob/master/lib/cheatorious/writer/text.rb#L45

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

Successfully merging this pull request may close these issues.

2 participants