Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ext/attach/attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ __catch_line_event(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE
}

int
start_attach()
debase_start_attach()
{
if (rb_during_gc())
return 1;
rb_add_event_hook(__catch_line_event, RUBY_EVENT_LINE, (VALUE) NULL);
return 0;
}

void
debase_rb_eval(const char *string_to_eval)
{
rb_eval_string_protect(string_to_eval, NULL);
}
3 changes: 2 additions & 1 deletion ext/attach/attach.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <ruby.h>
#include <ruby/debug.h>

int start_attach();
int debase_start_attach();
void debase_rb_eval();

#endif //__ATTACH_H__