commit rubygem-byebug for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-byebug for openSUSE:Factory checked in at 2015-08-29 20:05:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-byebug (Old) and /work/SRC/openSUSE:Factory/.rubygem-byebug.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-byebug" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-byebug/rubygem-byebug.changes 2015-08-27 08:56:07.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-byebug.new/rubygem-byebug.changes 2015-08-29 20:05:21.000000000 +0200 @@ -1,0 +2,16 @@ +Mon Aug 24 04:28:30 UTC 2015 - coolo@suse.com + +- updated to version 6.0.2 + see installed CHANGELOG.md + + ## 6.0.2 - 2015-08-20 + ### Fixed + * The user should always be given back a prompt unless (s)he explicitly states + the opposite. This provides a more general fix to the bug resolved in 6.0.1. + + ## 6.0.1 - 2015-08-19 + ### Fixed + * Bug in evaluation where the user would lose the command prompt when entering + an expression with a syntax error. + +------------------------------------------------------------------- Old: ---- byebug-6.0.0.gem New: ---- byebug-6.0.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-byebug.spec ++++++ --- /var/tmp/diff_new_pack.Pl6zOd/_old 2015-08-29 20:05:22.000000000 +0200 +++ /var/tmp/diff_new_pack.Pl6zOd/_new 2015-08-29 20:05:22.000000000 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-byebug -Version: 6.0.0 +Version: 6.0.2 Release: 0 %define mod_name byebug %define mod_full_name %{mod_name}-%{version} ++++++ byebug-6.0.0.gem -> byebug-6.0.2.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2015-08-18 01:32:12.000000000 +0200 +++ new/CHANGELOG.md 2015-08-20 17:06:59.000000000 +0200 @@ -1,3 +1,13 @@ +## 6.0.2 - 2015-08-20 +### Fixed +* The user should always be given back a prompt unless (s)he explicitly states +the opposite. This provides a more general fix to the bug resolved in 6.0.1. + +## 6.0.1 - 2015-08-19 +### Fixed +* Bug in evaluation where the user would lose the command prompt when entering +an expression with a syntax error. + ## 6.0.0 - 2015-08-17 ### Removed * `autoeval` setting. I haven't heard of anyone setting it to false. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2015-08-18 01:32:12.000000000 +0200 +++ new/README.md 2015-08-20 17:06:59.000000000 +0200 @@ -53,9 +53,8 @@ [debugger][]. * Recommended: - - MRI 2.0.0-p576 or higher. - - MRI 2.1.3 or higher. - - MRI 2.2.1 or higher. + - MRI 2.1.7 or higher. + - MRI 2.2.3 or higher. ## Install Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/commands/break.rb new/lib/byebug/commands/break.rb --- old/lib/byebug/commands/break.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/commands/break.rb 2015-08-20 17:06:59.000000000 +0200 @@ -70,7 +70,7 @@ end def target_object(str) - k = warning_eval(str) + k = error_eval(str) k && k.is_a?(Module) ? k.name : str rescue diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/commands/display.rb new/lib/byebug/commands/display.rb --- old/lib/byebug/commands/display.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/commands/display.rb 2015-08-20 17:06:59.000000000 +0200 @@ -56,7 +56,7 @@ end def eval_expr(expression) - thread_safe_eval(expression).inspect + error_eval(expression).inspect rescue '(undefined)' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/commands/history.rb new/lib/byebug/commands/history.rb --- old/lib/byebug/commands/history.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/commands/history.rb 2015-08-20 17:06:59.000000000 +0200 @@ -30,7 +30,7 @@ history = processor.interface.history if @match[:num_cmds] - size, = get_int(@match[:num_cmds], 'history', 1, history.size) + size, err = get_int(@match[:num_cmds], 'history', 1, history.size) return errmsg(err) unless size end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/commands/list.rb new/lib/byebug/commands/list.rb --- old/lib/byebug/commands/list.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/commands/list.rb 2015-08-20 17:06:59.000000000 +0200 @@ -36,11 +36,11 @@ def execute msg = "No sourcefile available for #{frame.file}" - return errmsg(msg) unless File.exist?(frame.file) + fail(msg) unless File.exist?(frame.file) max_lines = n_lines(frame.file) b, e = range(@match[2], max_lines) - return errmsg('Invalid line range') unless valid_range?(b, e, max_lines) + fail('Invalid line range') unless valid_range?(b, e, max_lines) display_lines(b, e) @@ -85,11 +85,11 @@ def parse_range(input, size, max_line) first, err = get_int(lower_bound(input), 'List', 1, max_line) - return [-1, -1] if err + fail(err) unless first if upper_bound(input) - last, = get_int(upper_bound(input), 'List', 1, max_line) - return [-1, -1] unless last + last, err = get_int(upper_bound(input), 'List', 1, max_line) + fail(err) unless last last = amend(last, max_line) else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/commands/up.rb new/lib/byebug/commands/up.rb --- old/lib/byebug/commands/up.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/commands/up.rb 2015-08-20 17:06:59.000000000 +0200 @@ -14,7 +14,7 @@ self.allow_in_post_mortem = true def self.regexp - /^\s* u(?:p)? (?:\s+(\S+))? \s*$/x + /^\s* up (?:\s+(\S+))? \s*$/x end def self.description diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/helpers/eval.rb new/lib/byebug/helpers/eval.rb --- old/lib/byebug/helpers/eval.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/helpers/eval.rb 2015-08-20 17:06:59.000000000 +0200 @@ -19,8 +19,6 @@ # @param expression [String] Expression to evaluate # def single_thread_eval(expression) - return error_eval(expression) if Setting[:stack_on_error] - warning_eval(expression) end @@ -29,9 +27,7 @@ # returning nil in an error happens. # def silent_eval(str, binding = frame._binding) - binding.eval(str) - rescue StandardError, ScriptError - nil + safe_eval(str, binding) { |_e| nil } end # @@ -39,7 +35,7 @@ # handling the errors at an error level. # def error_eval(str, binding = frame._binding) - safe_eval(str, binding) { |e| error_msg(e) } + safe_eval(str, binding) { |e| fail(e, msg(e)) } end # @@ -47,7 +43,7 @@ # handling the errors at a warning level. # def warning_eval(str, binding = frame._binding) - safe_eval(str, binding) { |e| warning_msg(e) } + safe_eval(str, binding) { |e| errmsg(msg(e)) } end private @@ -55,19 +51,25 @@ def safe_eval(str, binding) binding.eval(str) rescue StandardError, ScriptError => e - raise(e, yield(e)) + yield(e) + end + + def msg(e) + msg = Setting[:stack_on_error] ? error_msg(e) : warning_msg(e) + + pr('eval.exception', text_message: msg) end def error_msg(e) at = e.backtrace - locations = ["#{at.shift}: #{e.class} Exception(#{e.message})"] - locations += at.map { |path| "\tfrom #{path}" } - pr('eval.exception', text_message: locations.join("\n")) + locations = ["#{at.shift}: #{warning_msg(e)}"] + locations += at.map { |path| "\tfrom #{path}" } + locations.join("\n") end def warning_msg(e) - pr('eval.exception', text_message: "#{e.class} Exception: #{e.message}") + "#{e.class} Exception: #{e.message}" end # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/helpers/parse.rb new/lib/byebug/helpers/parse.rb --- old/lib/byebug/helpers/parse.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/helpers/parse.rb 2015-08-20 17:06:59.000000000 +0200 @@ -14,17 +14,16 @@ # def get_int(str, cmd, min = nil, max = nil) if str !~ /\A-?[0-9]+\z/ - err = pr('parse.errors.int.not_number', cmd: cmd, str: str) - return nil, errmsg(err) + return nil, pr('parse.errors.int.not_number', cmd: cmd, str: str) end int = str.to_i if min && int < min err = pr('parse.errors.int.too_low', cmd: cmd, str: str, min: min) - return min, errmsg(err) + return nil, err elsif max && int > max err = pr('parse.errors.int.too_high', cmd: cmd, str: str, max: max) - return max, errmsg(err) + return nil, err end int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/helpers/thread.rb new/lib/byebug/helpers/thread.rb --- old/lib/byebug/helpers/thread.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/helpers/thread.rb 2015-08-20 17:06:59.000000000 +0200 @@ -9,30 +9,12 @@ end def thread_arguments(ctx) - status_flag = if ctx.suspended? - '$' - else - current_thread?(ctx) ? '+' : ' ' - end - - debug_flag = ctx.ignored? ? '!' : ' ' - - # Check whether it is Byebug.current_context or context - if ctx == Byebug.current_context - file_line = context.location - else - backtrace = ctx.thread.backtrace_locations - if backtrace && backtrace[0] - file_line = "#{backtrace[0].path}:#{backtrace[0].lineno}" - end - end - { - status_flag: status_flag, - debug_flag: debug_flag, + status_flag: status_flag(ctx), + debug_flag: debug_flag(ctx), id: ctx.thnum, thread: ctx.thread.inspect, - file_line: file_line || '', + file_line: location(ctx), pid: Process.pid, status: ctx.thread.status, current: current_thread?(ctx) @@ -54,6 +36,28 @@ [ctx, err] end + + private + + # TODO: Check whether it is Byebug.current_context or context + def location(ctx) + return context.location if ctx == Byebug.current_context + + backtrace = ctx.thread.backtrace_locations + return '' unless backtrace && backtrace[0] + + "#{backtrace[0].path}:#{backtrace[0].lineno}" + end + + def status_flag(ctx) + return '$' if ctx.suspended? + + current_thread?(ctx) ? '+' : ' ' + end + + def debug_flag(ctx) + ctx.ignored? ? '!' : ' ' + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/processors/command_processor.rb new/lib/byebug/processors/command_processor.rb --- old/lib/byebug/processors/command_processor.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/processors/command_processor.rb 2015-08-20 17:06:59.000000000 +0200 @@ -157,7 +157,7 @@ puts thread_safe_eval(input) rescue => e - errmsg(e) + errmsg(e.message) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/settings/autoeval.rb new/lib/byebug/settings/autoeval.rb --- old/lib/byebug/settings/autoeval.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/settings/autoeval.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -require 'byebug/setting' - -module Byebug - # - # Setting for automatic evaluation of unknown commands. - # - class AutoevalSetting < Setting - DEFAULT = true - - def banner - 'Automatically evaluate unrecognized commands' - end - end -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/subcommands.rb new/lib/byebug/subcommands.rb --- old/lib/byebug/subcommands.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/subcommands.rb 2015-08-20 17:06:59.000000000 +0200 @@ -19,10 +19,11 @@ # Delegates to subcommands or prints help if no subcommand specified. # def execute - return puts(help) unless @match[1] + subcmd_name = @match[1] + return puts(help) unless subcmd_name - subcmd = subcommand_list.match(@match[1]) - fail CommandNotFound.new(@match[1], self.class) unless subcmd + subcmd = subcommand_list.match(subcmd_name) + fail CommandNotFound.new(subcmd_name, self.class) unless subcmd subcmd.new(processor, arguments).execute end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/byebug/version.rb new/lib/byebug/version.rb --- old/lib/byebug/version.rb 2015-08-18 01:32:12.000000000 +0200 +++ new/lib/byebug/version.rb 2015-08-20 17:06:59.000000000 +0200 @@ -2,5 +2,5 @@ # Reopen main module to define the library version # module Byebug - VERSION = '6.0.0' + VERSION = '6.0.2' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-08-18 01:32:12.000000000 +0200 +++ new/metadata 2015-08-20 17:06:59.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: byebug version: !ruby/object:Gem::Version - version: 6.0.0 + version: 6.0.2 platform: ruby authors: - David Rodriguez @@ -10,7 +10,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2015-08-17 00:00:00.000000000 Z +date: 2015-08-20 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: bundler @@ -152,7 +152,6 @@ - lib/byebug/remote.rb - lib/byebug/runner.rb - lib/byebug/setting.rb -- lib/byebug/settings/autoeval.rb - lib/byebug/settings/autoirb.rb - lib/byebug/settings/autolist.rb - lib/byebug/settings/autosave.rb @@ -189,7 +188,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.4.5 +rubygems_version: 2.4.5.1 signing_key: specification_version: 4 summary: Ruby 2.0 fast debugger - base + CLI
participants (1)
-
root@hilbert.suse.de