Hello community,

here is the log from the commit of package rubygem-byebug for openSUSE:Factory 
checked in at 2016-04-14 13:06:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2016-03-01 09:43:12.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-byebug.new/rubygem-byebug.changes       
2016-04-14 13:06:50.000000000 +0200
@@ -1,0 +2,18 @@
+Tue Apr 12 04:28:20 UTC 2016 - [email protected]
+
+- updated to version 8.2.4
+ see installed CHANGELOG.md
+
+  ## 8.2.4 - 2016-04-08
+  
+  ### Fixed
+  
+  * Reverts #211 which leads to an unusable debugger.
+
+-------------------------------------------------------------------
+Fri Apr  8 04:28:21 UTC 2016 - [email protected]
+
+- updated to version 8.2.3
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------

Old:
----
  byebug-8.2.2.gem

New:
----
  byebug-8.2.4.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-byebug.spec ++++++
--- /var/tmp/diff_new_pack.xpl5gn/_old  2016-04-14 13:06:50.000000000 +0200
+++ /var/tmp/diff_new_pack.xpl5gn/_new  2016-04-14 13:06:50.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-byebug
-Version:        8.2.2
+Version:        8.2.4
 Release:        0
 %define mod_name byebug
 %define mod_full_name %{mod_name}-%{version}

++++++ byebug-8.2.2.gem -> byebug-8.2.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2016-02-01 23:46:18.000000000 +0100
+++ new/CHANGELOG.md    2016-04-08 12:31:52.000000000 +0200
@@ -2,7 +2,23 @@
 
 ## Master (Unreleased)
 
-## 8.2.2 - 2015-02-01
+## 8.2.4 - 2016-04-08
+
+### Fixed
+
+* Reverts #211 which leads to an unusable debugger.
+
+## 8.2.3 - 2016-04-07
+
+### Fixed
+
+* Better interaction with utilities like RSpec when hitting Ctrl-C.
+* `irb` command when original program modified ARGV (#197, thanks @josephks).
+* Unusable debugger when stdin redirected (#211,thanks @sethk).
+* RC file loading when no explicit flag included (#223).
+* Installation on some Windows systems (#175, #226).
+
+## 8.2.2 - 2016-02-01
 
 ### Fixed
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/GUIDE.md new/GUIDE.md
--- old/GUIDE.md        2016-02-01 23:46:18.000000000 +0100
+++ new/GUIDE.md        2016-04-08 12:31:52.000000000 +0200
@@ -84,7 +84,7 @@
     8:
     9:   tri
    10: end
-(byebug) p tri
+(byebug) eval tri
 nil
 (byebug) step
 
@@ -99,7 +99,7 @@
     9:   tri
    10: end
    11:
-(byebug) p tri
+(byebug) eval tri
 0
 ```
 
@@ -107,7 +107,7 @@
 we entered was just hitting the return key: `byebug` remembers the last command
 you entered was `step` and runs it again.
 
-One way to print the values of variables is `p` (there are other ways). When we
+One way to print the values of variables is `eval` (there are other ways). 
When we
 look at the value of `tri` the first time, we see it is `nil`. Again we are
 stopped _before_ the assignment on line 5, and this variable hadn't been set
 previously. However after issuing another `step` command we see that the value
@@ -447,7 +447,7 @@
 => 28: hanoi(n, :a, :b, :c)
 (byebug) n_args
 0
-(byebug) p n
+(byebug) eval n
 3
 (byebug) down 2
 
@@ -462,12 +462,12 @@
     8:
     9:   hanoi(n - 1, c, b, a) if n - 1 > 0
    10: end
-(byebug) p n
+(byebug) eval n
 2
 ```
 
 Notice in the above to get the value of variable `n` we had to use a print
-command like `p n`. If we entered just `n`, that would be taken to mean byebug
+command like `eval n`. If we entered just `n`, that would be taken to mean 
byebug
 command `next`. In the current scope, variable `n_args` is not defined.  
However
 I can change to the top-most frame by using the `frame 2` command. Notice that
 inside frame #2, the value of `n_args` can be shown. Also note that the value 
of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2016-02-01 23:46:18.000000000 +0100
+++ new/README.md       2016-04-08 12:31:52.000000000 +0200
@@ -9,13 +9,13 @@
 [gem]: https://img.shields.io/gem/v/byebug.svg
 [gpa]: https://img.shields.io/codeclimate/github/deivid-rodriguez/byebug.svg
 [cov]: 
https://img.shields.io/codeclimate/coverage/github/deivid-rodriguez/byebug.svg
-[tip]: https://img.shields.io/gittip/deivid-rodriguez.svg
+[tip]: https://img.shields.io/gittip/byebug.svg
 [irc]: 
https://img.shields.io/badge/IRC%20(gitter)-devs%20%26%20users-brightgreen.svg
 
 [gem_url]: https://rubygems.org/gems/byebug
 [gpa_url]: https://codeclimate.com/github/deivid-rodriguez/byebug
 [cov_url]: https://codeclimate.com/github/deivid-rodriguez/byebug
-[tip_url]: https://gratipay.com/~deivid-rodriguez
+[tip_url]: https://gratipay.com/byebug
 [irc_url]: https://gitter.im/deivid-rodriguez/byebug
 
 Byebug is a simple to use, feature rich debugger for Ruby 2. It uses the new
@@ -67,9 +67,22 @@
 
     byebug
 
-wherever you want to start debugging and the execution will stop there. If you
-are debugging rails, start the server and once the execution gets to your
-`byebug` command you will get a debugging prompt.
+wherever you want to start debugging and the execution will stop there.
+If you were debugging Rails, for example, you would add `byebug` to your code.
+
+```ruby
+def index
+  byebug
+  @articles = Article.find_recent
+```
+
+And then start a Rails server.
+
+```shell
+bin/rails s
+```
+
+Once the execution gets to your `byebug` command you will get a debugging 
prompt.
 
 ## Byebug's commands
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bin/byebug new/bin/byebug
--- old/bin/byebug      2016-02-01 23:46:18.000000000 +0100
+++ new/bin/byebug      2016-04-08 12:31:52.000000000 +0200
@@ -1,5 +1,7 @@
 #!/usr/bin/env ruby
 
+$LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) + '/../lib')
+
 require 'byebug/runner'
 
 Byebug::Runner.new.run
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/byebug/breakpoint.c new/ext/byebug/breakpoint.c
--- old/ext/byebug/breakpoint.c 2016-02-01 23:46:18.000000000 +0100
+++ new/ext/byebug/breakpoint.c 2016-04-08 12:31:52.000000000 +0200
@@ -1,4 +1,4 @@
-#include <byebug.h>
+#include "byebug.h"
 
 #ifdef _WIN32
 #include <ctype.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/byebug/byebug.c new/ext/byebug/byebug.c
--- old/ext/byebug/byebug.c     2016-02-01 23:46:18.000000000 +0100
+++ new/ext/byebug/byebug.c     2016-04-08 12:31:52.000000000 +0200
@@ -1,4 +1,4 @@
-#include <byebug.h>
+#include "byebug.h"
 
 static VALUE mByebug;   /* Ruby Byebug Module object */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/byebug/byebug.h new/ext/byebug/byebug.h
--- old/ext/byebug/byebug.h     2016-02-01 23:46:18.000000000 +0100
+++ new/ext/byebug/byebug.h     2016-04-08 12:31:52.000000000 +0200
@@ -8,13 +8,13 @@
 #define UNUSED(x) (void)(x)
 
 /* flags */
-#define CTX_FL_DEAD         (1<<1) /* this context belonged to a dead thread */
-#define CTX_FL_IGNORE       (1<<2) /* this context belongs to ignored thread */
-#define CTX_FL_SUSPEND      (1<<3) /* thread currently suspended             */
-#define CTX_FL_TRACING      (1<<4) /* call at_tracing method                 */
-#define CTX_FL_WAS_RUNNING  (1<<5) /* thread was previously running          */
-#define CTX_FL_STOP_ON_RET  (1<<6) /* can stop on method 'end'               */
-#define CTX_FL_IGNORE_STEPS (1<<7) /* doesn't countdown steps to break       */
+#define CTX_FL_DEAD         (1<<1)      /* this context belonged to a dead 
thread */
+#define CTX_FL_IGNORE       (1<<2)      /* this context belongs to ignored 
thread */
+#define CTX_FL_SUSPEND      (1<<3)      /* thread currently suspended          
   */
+#define CTX_FL_TRACING      (1<<4)      /* call at_tracing method              
   */
+#define CTX_FL_WAS_RUNNING  (1<<5)      /* thread was previously running       
   */
+#define CTX_FL_STOP_ON_RET  (1<<6)      /* can stop on method 'end'            
   */
+#define CTX_FL_IGNORE_STEPS (1<<7)      /* doesn't countdown steps to break    
   */
 
 /* macro functions */
 #define CTX_FL_TEST(c,f) ((c)->flags & (f))
@@ -22,14 +22,16 @@
 #define CTX_FL_UNSET(c,f) do { (c)->flags &= ~(f); } while (0)
 
 /* types */
-typedef enum {
+typedef enum
+{
   CTX_STOP_NONE,
   CTX_STOP_STEP,
   CTX_STOP_BREAKPOINT,
   CTX_STOP_CATCHPOINT
 } ctx_stop_reason;
 
-typedef struct {
+typedef struct
+{
   int calced_stack_size;
   int flags;
   ctx_stop_reason stop_reason;
@@ -37,22 +39,24 @@
   VALUE thread;
   int thnum;
 
-  int dest_frame;              /* next stop's frame if stopped by next     */
-  int lines;                   /* # of lines in dest_frame before stopping */
-  int steps;                   /* # of steps before stopping               */
-  int steps_out;               /* # of returns before stopping             */
+  int dest_frame;       /* next stop's frame if stopped by next     */
+  int lines;    /* # of lines in dest_frame before stopping */
+  int steps;    /* # of steps before stopping               */
+  int steps_out;        /* # of returns before stopping             */
 
-  VALUE backtrace;             /* [[loc, self, klass, binding], ...] */
+  VALUE backtrace;      /* [[loc, self, klass, binding], ...] */
 } debug_context_t;
 
-typedef enum {
+typedef enum
+{
   LOCATION,
   SELF,
   CLASS,
   BINDING
 } frame_part;
 
-struct call_with_inspection_data {
+struct call_with_inspection_data
+{
   debug_context_t *dc;
   VALUE ctx;
   ID id;
@@ -60,15 +64,19 @@
   VALUE *argv;
 };
 
-typedef struct {
+typedef struct
+{
   st_table *tbl;
 } threads_table_t;
 
-enum bp_type { BP_POS_TYPE, BP_METHOD_TYPE };
+enum bp_type
+{ BP_POS_TYPE, BP_METHOD_TYPE };
 
-enum hit_condition { HIT_COND_NONE, HIT_COND_GE, HIT_COND_EQ, HIT_COND_MOD };
+enum hit_condition
+{ HIT_COND_NONE, HIT_COND_GE, HIT_COND_EQ, HIT_COND_MOD };
 
-typedef struct {
+typedef struct
+{
   int id;
   enum bp_type type;
   VALUE source;
@@ -93,9 +101,9 @@
 /* functions from threads.c */
 extern void Init_threads_table(VALUE mByebug);
 extern VALUE create_threads_table(void);
-extern void thread_context_lookup(VALUE thread, VALUE *context);
+extern void thread_context_lookup(VALUE thread, VALUE * context);
 extern int is_living_thread(VALUE thread);
-extern void acquire_lock(debug_context_t *dc);
+extern void acquire_lock(debug_context_t * dc);
 extern void release_lock(void);
 
 /* global variables */
@@ -105,27 +113,21 @@
 /* functions from context.c */
 extern void Init_context(VALUE mByebug);
 extern VALUE context_create(VALUE thread);
-extern VALUE context_dup(debug_context_t *context);
-extern void reset_stepping_stop_points(debug_context_t *context);
+extern VALUE context_dup(debug_context_t * context);
+extern void reset_stepping_stop_points(debug_context_t * context);
 extern VALUE call_with_debug_inspector(struct call_with_inspection_data *data);
-extern VALUE context_backtrace_set(const rb_debug_inspector_t *inspector,
+extern VALUE context_backtrace_set(const rb_debug_inspector_t * inspector,
                                    void *data);
 
 /* functions from breakpoint.c */
 extern void Init_breakpoint(VALUE mByebug);
-extern VALUE catchpoint_hit_count(VALUE catchpoints,
-                                  VALUE exception,
-                                  VALUE *exception_name);
-
-extern VALUE find_breakpoint_by_pos(VALUE breakpoints,
-                                    VALUE source,
-                                    VALUE pos,
+extern VALUE catchpoint_hit_count(VALUE catchpoints, VALUE exception,
+                                  VALUE * exception_name);
+
+extern VALUE find_breakpoint_by_pos(VALUE breakpoints, VALUE source, VALUE pos,
                                     VALUE bind);
 
-extern VALUE find_breakpoint_by_method(VALUE breakpoints,
-                                       VALUE klass,
-                                       VALUE mid,
-                                       VALUE bind,
-                                       VALUE self);
+extern VALUE find_breakpoint_by_method(VALUE breakpoints, VALUE klass,
+                                       VALUE mid, VALUE bind, VALUE self);
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/byebug/context.c new/ext/byebug/context.c
--- old/ext/byebug/context.c    2016-02-01 23:46:18.000000000 +0100
+++ new/ext/byebug/context.c    2016-04-08 12:31:52.000000000 +0200
@@ -1,4 +1,4 @@
-#include <byebug.h>
+#include "byebug.h"
 
 static VALUE cContext;
 static VALUE cDebugThread;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/byebug/extconf.rb new/ext/byebug/extconf.rb
--- old/ext/byebug/extconf.rb   2016-02-01 23:46:18.000000000 +0100
+++ new/ext/byebug/extconf.rb   2016-04-08 12:31:52.000000000 +0200
@@ -1,21 +1,10 @@
-if RUBY_VERSION < '2.0'
-  STDERR.print("Ruby version is too old\n")
-  exit(1)
-end
-
 require 'mkmf'
 
 makefile_config = RbConfig::MAKEFILE_CONFIG
 
 makefile_config['CC'] = ENV['CC'] if ENV['CC']
 
-makefile_config['CFLAGS'] << ' -Wall -Werror'
 makefile_config['CFLAGS'] << ' -gdwarf-2 -g3 -O0' if ENV['debug']
 
-if makefile_config['CC'] =~ /clang/
-  makefile_config['CFLAGS'] << ' -Wno-unknown-warning-option'
-  makefile_config['CFLAGS'] << ' -Wno-ignored-attributes'
-end
-
 dir_config('ruby')
 with_cflags(makefile_config['CFLAGS']) { create_makefile('byebug/byebug') }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/byebug/locker.c new/ext/byebug/locker.c
--- old/ext/byebug/locker.c     2016-02-01 23:46:18.000000000 +0100
+++ new/ext/byebug/locker.c     2016-04-08 12:31:52.000000000 +0200
@@ -1,4 +1,4 @@
-#include <byebug.h>
+#include "byebug.h"
 
 /**
  * A simple linked list containing locked threads, FIFO style.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/byebug/threads.c new/ext/byebug/threads.c
--- old/ext/byebug/threads.c    2016-02-01 23:46:18.000000000 +0100
+++ new/ext/byebug/threads.c    2016-04-08 12:31:52.000000000 +0200
@@ -1,4 +1,4 @@
-#include <byebug.h>
+#include "byebug.h"
 
 /* Threads table class */
 static VALUE cThreadsTable;
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    2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/commands/break.rb    2016-04-08 12:31:52.000000000 +0200
@@ -80,16 +80,16 @@
     end
 
     def add_line_breakpoint(file, line)
-      fail(pr('break.errors.source', file: file)) unless File.exist?(file)
+      raise(pr('break.errors.source', file: file)) unless File.exist?(file)
 
       fullpath = File.realpath(file)
 
       if line > n_lines(file)
-        fail(pr('break.errors.far_line', lines: n_lines(file), file: fullpath))
+        raise(pr('break.errors.far_line', lines: n_lines(file), file: 
fullpath))
       end
 
       unless Breakpoint.potential_line?(fullpath, line)
-        fail(pr('break.errors.line', file: fullpath, line: line))
+        raise(pr('break.errors.line', file: fullpath, line: line))
       end
 
       Breakpoint.add(fullpath, line, @match[2])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/commands/help.rb 
new/lib/byebug/commands/help.rb
--- old/lib/byebug/commands/help.rb     2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/commands/help.rb     2016-04-08 12:31:52.000000000 +0200
@@ -44,7 +44,7 @@
     end
 
     def help_for(input, cmd)
-      fail CommandNotFound.new(input, command) unless cmd
+      raise CommandNotFound.new(input, command) unless cmd
 
       puts(cmd.help)
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/commands/irb.rb 
new/lib/byebug/commands/irb.rb
--- old/lib/byebug/commands/irb.rb      2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/commands/irb.rb      2016-04-08 12:31:52.000000000 +0200
@@ -29,7 +29,20 @@
         return errmsg(pr('base.errors.only_local'))
       end
 
-      IRB.start(__FILE__)
+      # IRB tries to parse ARGV so we must clear it.  See issue 197
+      with_clean_argv { IRB.start(__FILE__) }
+    end
+
+    private
+
+    def with_clean_argv
+      saved_argv = ARGV.dup
+      ARGV.clear
+      begin
+        yield
+      ensure
+        ARGV.concat(saved_argv)
+      end
     end
   end
 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     2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/commands/list.rb     2016-04-08 12:31:52.000000000 +0200
@@ -36,11 +36,11 @@
 
     def execute
       msg = "No sourcefile available for #{frame.file}"
-      fail(msg) unless File.exist?(frame.file)
+      raise(msg) unless File.exist?(frame.file)
 
       max_lines = n_lines(frame.file)
       b, e = range(@match[2], max_lines)
-      fail('Invalid line range') unless valid_range?(b, e, max_lines)
+      raise('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)
-      fail(err) unless first
+      raise(err) unless first
 
       if upper_bound(input)
         last, err = get_int(upper_bound(input), 'List', 1, max_line)
-        fail(err) unless last
+        raise(err) unless last
 
         last = amend(last, max_line)
       else
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      2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/helpers/eval.rb      2016-04-08 12:31:52.000000000 +0200
@@ -42,7 +42,7 @@
       # handling the errors at an error level.
       #
       def error_eval(str, binding = frame._binding)
-        safe_eval(str, binding) { |e| fail(e, msg(e)) }
+        safe_eval(str, binding) { |e| raise(e, msg(e)) }
       end
 
       #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/history.rb new/lib/byebug/history.rb
--- old/lib/byebug/history.rb   2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/history.rb   2016-04-08 12:31:52.000000000 +0200
@@ -113,7 +113,7 @@
     #
     def ignore?(buf)
       return true if /^\s*$/ =~ buf
-      return false if Readline::HISTORY.length == 0
+      return false if Readline::HISTORY.empty?
 
       Readline::HISTORY[Readline::HISTORY.length - 1] == buf
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/interface.rb new/lib/byebug/interface.rb
--- old/lib/byebug/interface.rb 2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/interface.rb 2016-04-08 12:31:52.000000000 +0200
@@ -1,3 +1,4 @@
+require 'byebug/setting'
 require 'byebug/history'
 require 'byebug/helpers/file'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/interfaces/local_interface.rb 
new/lib/byebug/interfaces/local_interface.rb
--- old/lib/byebug/interfaces/local_interface.rb        2016-02-01 
23:46:18.000000000 +0100
+++ new/lib/byebug/interfaces/local_interface.rb        2016-04-08 
12:31:52.000000000 +0200
@@ -14,17 +14,32 @@
     end
 
     #
-    # Reads a single line of input using Readline. If Ctrl-C is pressed in the
-    # middle of input, the line is reset to only the prompt and we ask for 
input
-    # again. If Ctrl-D is pressed, it returns "continue".
+    # Reads a single line of input using Readline. If Ctrl-D is pressed, it
+    # returns "continue", meaning that program's execution will go on.
     #
     # @param prompt Prompt to be displayed.
     #
     def readline(prompt)
-      Readline.readline(prompt, false) || EOF_ALIAS
+      with_repl_like_sigint do
+        Readline.readline(prompt, false) || EOF_ALIAS
+      end
+    end
+
+    #
+    # Yields the block handling Ctrl-C the following way: if pressed while
+    # waiting for input, the line is reset to only the prompt and we ask for
+    # input again.
+    #
+    # @note Any external 'INT' traps are overriden during this method.
+    #
+    def with_repl_like_sigint
+      orig_handler = trap('INT') { raise Interrupt }
+      yield
     rescue Interrupt
       puts('^C')
       retry
+    ensure
+      trap('INT', orig_handler)
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/interfaces/remote_interface.rb 
new/lib/byebug/interfaces/remote_interface.rb
--- old/lib/byebug/interfaces/remote_interface.rb       2016-02-01 
23:46:18.000000000 +0100
+++ new/lib/byebug/interfaces/remote_interface.rb       2016-04-08 
12:31:52.000000000 +0200
@@ -30,7 +30,7 @@
       output.puts(prompt)
 
       result = input.gets
-      fail IOError unless result
+      raise IOError unless result
 
       result.chomp
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/option_setter.rb 
new/lib/byebug/option_setter.rb
--- old/lib/byebug/option_setter.rb     2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/option_setter.rb     2016-04-08 12:31:52.000000000 +0200
@@ -50,7 +50,7 @@
 
     def rc
       @opts.on '-x', '--[no-]rc', 'Run byebug initialization file' do |v|
-        Byebug.run_init_script if v
+        @runner.init_script = v
       end
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/printers/base.rb 
new/lib/byebug/printers/base.rb
--- old/lib/byebug/printers/base.rb     2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/printers/base.rb     2016-04-08 12:31:52.000000000 +0200
@@ -26,7 +26,7 @@
           end
           break if result
         end
-        fail MissedPath, "Can't find part path '#{path}'" unless result
+        raise MissedPath, "Can't find part path '#{path}'" unless result
         result
       end
 
@@ -35,7 +35,7 @@
         string.gsub(/\|\w+$/, '').gsub(/([^#]?){([^}]*)}/) do
           key = Regexp.last_match[2].to_s
           unless args.key?(key.to_sym)
-            fail MissedArgument, "Missed argument #{key} for '#{string}'"
+            raise MissedArgument, "Missed argument #{key} for '#{string}'"
           end
 
           "#{Regexp.last_match[1]}#{args[key.to_sym]}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/byebug/runner.rb new/lib/byebug/runner.rb
--- old/lib/byebug/runner.rb    2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/runner.rb    2016-04-08 12:31:52.000000000 +0200
@@ -44,6 +44,11 @@
     attr_accessor :stop
 
     #
+    # Signals that we should run rc scripts before program starts
+    #
+    attr_writer :init_script
+
+    #
     # @param stop [Boolean] Whether the runner should stop right before
     # starting the program.
     #
@@ -71,6 +76,10 @@
       @remote ||= Byebug.parse_host_and_port(host_and_port)
     end
 
+    def init_script
+      defined?(@init_script) ? @init_script : true
+    end
+
     #
     # Usage banner.
     #
@@ -96,6 +105,8 @@
         return
       end
 
+      Byebug.run_init_script if init_script
+
       setup_cmd_line_args
 
       loop do
@@ -130,11 +141,11 @@
     def setup_cmd_line_args
       Byebug.mode = :standalone
 
-      fail(NoScript, 'You must specify a program to debug...') if $ARGV.empty?
+      raise(NoScript, 'You must specify a program to debug...') if $ARGV.empty?
 
       program = which($ARGV.shift)
       program = which($ARGV.shift) if program == which('ruby')
-      fail(NonExistentScript, "The script doesn't exist") unless program
+      raise(NonExistentScript, "The script doesn't exist") unless program
 
       $PROGRAM_NAME = program
     end
@@ -144,7 +155,7 @@
     #
     def debug_program
       ok = syntax_valid?(File.read($PROGRAM_NAME))
-      fail(InvalidScript, 'The script has incorrect syntax') unless ok
+      raise(InvalidScript, 'The script has incorrect syntax') unless ok
 
       error = Byebug.debug_load($PROGRAM_NAME, stop)
       puts "#{error}\n#{error.backtrace}" if error
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       2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/subcommands.rb       2016-04-08 12:31:52.000000000 +0200
@@ -23,7 +23,7 @@
       return puts(help) unless subcmd_name
 
       subcmd = subcommand_list.match(subcmd_name)
-      fail CommandNotFound.new(subcmd_name, self.class) unless subcmd
+      raise 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   2016-02-01 23:46:18.000000000 +0100
+++ new/lib/byebug/version.rb   2016-04-08 12:31:52.000000000 +0200
@@ -3,5 +3,5 @@
 # Reopen main module to define the library version
 #
 module Byebug
-  VERSION = '8.2.2'.freeze
+  VERSION = '8.2.4'.freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-02-01 23:46:18.000000000 +0100
+++ new/metadata        2016-04-08 12:31:52.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: byebug
 version: !ruby/object:Gem::Version
-  version: 8.2.2
+  version: 8.2.4
 platform: ruby
 authors:
 - David Rodriguez
@@ -10,7 +10,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-02-01 00:00:00.000000000 Z
+date: 2016-04-08 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: bundler
@@ -189,7 +189,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.5.1
+rubygems_version: 2.6.0
 signing_key: 
 specification_version: 4
 summary: Ruby 2.0 fast debugger - base + CLI


Reply via email to