From 21393f1b2de63dd6c539774cccd2ce1718c6a138 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 22 May 2005 03:31:08 +0000 Subject: [PATCH] * intern.h, parse.y (ruby_pragma): removed. fixed: [ruby-dev:26198] * parse.y (parser_pragma): pragma name was ignored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ intern.h | 1 - parse.y | 11 ++--------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0490c530cb..7728d88928 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun May 22 12:30:58 2005 Nobuyoshi Nakada + + * intern.h, parse.y (ruby_pragma): removed. fixed: [ruby-dev:26198] + + * parse.y (parser_pragma): pragma name was ignored. + Sun May 22 02:39:57 2005 Minero Aoki * lib/fileutils.rb (rm_r): new option :secure to avoid diff --git a/intern.h b/intern.h index 2b2fd3a3cc..221e223b05 100644 --- a/intern.h +++ b/intern.h @@ -394,7 +394,6 @@ void ruby_process_options _((int, char**)); void ruby_load_script _((void)); void ruby_init_loadpath _((void)); void ruby_incpush _((const char*)); -int ruby_pragma _((const char*, int)); /* signal.c */ VALUE rb_f_kill _((int, VALUE*)); void rb_gc_mark_trap_list _((void)); diff --git a/parse.y b/parse.y index 3519f72595..5d2e6690de 100644 --- a/parse.y +++ b/parse.y @@ -5470,7 +5470,8 @@ parser_pragma(parser, str, len) } while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; - str_copy(name, beg, end - beg); + n = end - beg; + str_copy(name, beg, n); rb_funcall(name, rb_intern("downcase!"), 0); do { if (strncmp(p->name, RSTRING(name)->ptr, n) == 0) { @@ -5484,14 +5485,6 @@ parser_pragma(parser, str, len) return Qtrue; } -int -ruby_pragma(str, len) - const char *str; - int len; -{ - return parser_pragma(0, str, len); -} - static void parser_prepare(parser) struct parser_params *parser;