* hash.c (env_delete, rb_f_getenv, env_fetch): case insensitive to

access environment variables on DOSISH platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2003-06-19 04:21:25 +00:00
parent d8b02b5096
commit 7bb51e6ce9
3 changed files with 14 additions and 9 deletions

View File

@ -1,3 +1,8 @@
Thu Jun 19 13:13:10 2003 NAKAMURA Usaku <usa@ruby-lang.org>
* hash.c (env_delete, rb_f_getenv, env_fetch): case insensitive to
access environment variables on DOSISH platforms.
Wed Jun 18 23:41:27 2003 Marc Cartright <marc@isri.unlv.edu> Wed Jun 18 23:41:27 2003 Marc Cartright <marc@isri.unlv.edu>
* ext/zlib/zlib.c (zstream_run): In a particular situation, * ext/zlib/zlib.c (zstream_run): In a particular situation,

12
hash.c
View File

@ -1017,8 +1017,8 @@ env_delete(obj, name)
VALUE value = env_str_new2(val); VALUE value = env_str_new2(val);
ruby_setenv(nam, 0); ruby_setenv(nam, 0);
#ifdef __BORLANDC__ #ifdef DOSISH
if (strcmpi(nam, "PATH") == 0) { if (strcasecmp(nam, "PATH") == 0) {
#else #else
if (strcmp(nam, "PATH") == 0) { if (strcmp(nam, "PATH") == 0) {
#endif #endif
@ -1053,8 +1053,8 @@ rb_f_getenv(obj, name)
} }
env = getenv(nam); env = getenv(nam);
if (env) { if (env) {
#ifdef __BORLANDC__ #ifdef DOSISH
if (strcmpi(nam, "PATH") == 0 && !rb_env_path_tainted()) if (strcasecmp(nam, "PATH") == 0 && !rb_env_path_tainted())
#else #else
if (strcmp(nam, "PATH") == 0 && !rb_env_path_tainted()) if (strcmp(nam, "PATH") == 0 && !rb_env_path_tainted())
#endif #endif
@ -1096,8 +1096,8 @@ env_fetch(argc, argv)
} }
return if_none; return if_none;
} }
#ifdef __BORLANDC__ #ifdef DOSISH
if (strcmpi(nam, "PATH") == 0 && !rb_env_path_tainted()) if (strcasecmp(nam, "PATH") == 0 && !rb_env_path_tainted())
#else #else
if (strcmp(nam, "PATH") == 0 && !rb_env_path_tainted()) if (strcmp(nam, "PATH") == 0 && !rb_env_path_tainted())
#endif #endif

View File

@ -1,11 +1,11 @@
#define RUBY_VERSION "1.8.0" #define RUBY_VERSION "1.8.0"
#define RUBY_RELEASE_DATE "2003-06-16" #define RUBY_RELEASE_DATE "2003-06-19"
#define RUBY_VERSION_CODE 180 #define RUBY_VERSION_CODE 180
#define RUBY_RELEASE_CODE 20030616 #define RUBY_RELEASE_CODE 20030619
#define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 0 #define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2003 #define RUBY_RELEASE_YEAR 2003
#define RUBY_RELEASE_MONTH 6 #define RUBY_RELEASE_MONTH 6
#define RUBY_RELEASE_DAY 16 #define RUBY_RELEASE_DAY 19