Skip to content

Commit

Permalink
Merge pull request #443 from tzmfreedom/modify_context_variable_name
Browse files Browse the repository at this point in the history
Rename function to prevent conflict to debase
  • Loading branch information
deivid-rodriguez authored Mar 21, 2018
2 parents 0ca3ce9 + 8cbe292 commit a3ffdcd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Master (Unreleased)

### Fixed

* Error when using byebug with `debase` gem (#443, @tzmfreedom)

## 10.0.0 - 2018-01-26

### Changed
Expand Down
2 changes: 1 addition & 1 deletion ext/byebug/byebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ Init_byebug()
rb_define_module_function(mByebug, "verbose=", Set_verbose, 1);

Init_threads_table(mByebug);
Init_context(mByebug);
Init_byebug_context(mByebug);
Init_breakpoint(mByebug);

rb_global_variable(&breakpoints);
Expand Down
4 changes: 2 additions & 2 deletions ext/byebug/byebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ extern VALUE threads;
extern VALUE next_thread;

/* functions from context.c */
extern void Init_context(VALUE mByebug);
extern VALUE context_create(VALUE thread);
extern void Init_byebug_context(VALUE mByebug);
extern VALUE byebug_context_create(VALUE thread);
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);
Expand Down
4 changes: 2 additions & 2 deletions ext/byebug/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dc_stack_size(debug_context_t *context)
}

extern VALUE
context_create(VALUE thread)
byebug_context_create(VALUE thread)
{
debug_context_t *context = ALLOC(debug_context_t);

Expand Down Expand Up @@ -642,7 +642,7 @@ dt_inherited(VALUE klass)
* Byebug keeps a single instance of this class per thread.
*/
void
Init_context(VALUE mByebug)
Init_byebug_context(VALUE mByebug)
{
cContext = rb_define_class_under(mByebug, "Context", rb_cObject);

Expand Down
2 changes: 1 addition & 1 deletion ext/byebug/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ thread_context_lookup(VALUE thread, VALUE *context)

if (!st_lookup(t_tbl->tbl, thread, context) || !*context)
{
*context = context_create(thread);
*context = byebug_context_create(thread);
st_insert(t_tbl->tbl, thread, *context);
}
}
Expand Down

0 comments on commit a3ffdcd

Please sign in to comment.