This project is closed and read-only.
Bug #212 » no212.patch
| ext/readline/readline.c (working copy) | ||
|---|---|---|
|
#endif /* HAVE_RL_FILENAME_QUOTE_CHARACTERS */
|
||
|
}
|
||
|
#ifdef HAVE_EDITLINE_READLINE_H
|
||
|
#define HISTORY_BASE (history_base - 1)
|
||
|
#else
|
||
|
#define HISTORY_BASE (history_base)
|
||
|
#endif
|
||
|
static VALUE
|
||
|
hist_to_s(self)
|
||
|
VALUE self;
|
||
| ... | ... | |
|
if (i < 0) {
|
||
|
i += history_length;
|
||
|
}
|
||
|
entry = history_get(history_base + i);
|
||
|
entry = history_get(HISTORY_BASE + i);
|
||
|
if (entry == NULL) {
|
||
|
rb_raise(rb_eIndexError, "invalid index");
|
||
|
}
|
||
| ... | ... | |
|
rb_secure(4);
|
||
|
for (i = 0; i < history_length; i++) {
|
||
|
entry = history_get(history_base + i);
|
||
|
entry = history_get(HISTORY_BASE + i);
|
||
|
if (entry == NULL)
|
||
|
break;
|
||
|
rb_yield(rb_tainted_str_new2(entry->line));
|
||