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

Fix wrong usage of '%' in format () #8

Merged
merged 1 commit into from
Apr 8, 2019

Conversation

masatake
Copy link
Contributor

@masatake masatake commented Apr 7, 2019

It seems that the usage of '%' char in format() is more strict in a new
ruby implementation available in travis these days.
As the result, the converge summarization is failed with following message:

Traceback (most recent call last):
	12: from /home/travis/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `<main>'
	11: from /home/travis/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
	10: from /home/travis/.rvm/gems/ruby-2.5.3/bin/lcoveralls:23:in `<main>'
	 9: from /home/travis/.rvm/gems/ruby-2.5.3/bin/lcoveralls:23:in `load'
	 8: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/bin/lcoveralls:23:in `<top (required)>'
	 7: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:265:in `run'
	 6: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:116:in `get_source_files'
	 5: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:116:in `each'
	 4: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:122:in `block in get_source_files'
	 3: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:122:in `each'
	 2: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:158:in `block (2 levels) in get_source_files'
	 1: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:97:in `get_percentage'
/home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:97:in `format': incomplete format specifier; use %% (double %) instead (ArgumentError)

This change replaces '%' with '%%' to fix the wrong usage.

Signed-off-by: Masatake YAMATO [email protected]

It seems that the usage of '%' char in format() is more strict in a new
ruby implementation available in travis these days.
As the result, the converge summarization is failed with following message:

Traceback (most recent call last):
	12: from /home/travis/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `<main>'
	11: from /home/travis/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
	10: from /home/travis/.rvm/gems/ruby-2.5.3/bin/lcoveralls:23:in `<main>'
	 9: from /home/travis/.rvm/gems/ruby-2.5.3/bin/lcoveralls:23:in `load'
	 8: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/bin/lcoveralls:23:in `<top (required)>'
	 7: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:265:in `run'
	 6: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:116:in `get_source_files'
	 5: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:116:in `each'
	 4: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:122:in `block in get_source_files'
	 3: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:122:in `each'
	 2: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:158:in `block (2 levels) in get_source_files'
	 1: from /home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:97:in `get_percentage'
/home/travis/.rvm/gems/ruby-2.5.3/gems/lcoveralls-0.2.3/lib/lcoveralls/runner.rb:97:in `format': incomplete format specifier; use %% (double %) instead (ArgumentError)

This change replaces '%' with '%%' to fix the wrong usage.

Signed-off-by: Masatake YAMATO <[email protected]>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 45.575% when pulling a820350 on masatake:fixing-wrong-percent-char-usage into 2a96744 on pcolby:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 45.575% when pulling a820350 on masatake:fixing-wrong-percent-char-usage into 2a96744 on pcolby:master.

@pcolby pcolby merged commit 1fc711f into pcolby:master Apr 8, 2019
@pcolby
Copy link
Owner

pcolby commented Apr 8, 2019

Thanks @masatake! :)

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.

3 participants