rjb 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/ChangeLog +5 -0
  2. data/ext/load.c +13 -5
  3. data/ext/rjb.c +1 -1
  4. metadata +4 -4
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ Wed Jun 9 arton
2
+ *ext/load.c
3
+ accept JAVA_HOME having an extra slash at the end
4
+ *ext/rjb.c
5
+ RJB_VERSION -> 1.2.5
1
6
  Fri Jun 5 arton
2
7
  *ext/rjb.h
3
8
  defin HAVE_LONG_LONG if no HAVE_LONG_LONG but LP64
data/ext/load.c CHANGED
@@ -148,12 +148,20 @@ static int load_jvm(char* jvmtype)
148
148
  }
149
149
  else
150
150
  {
151
- if (strlen(jh) > HOME_NAME_LEN
152
- && strcasecmp(jh + strlen(jh) - HOME_NAME_LEN, HOME_NAME) == 0)
151
+ if (strlen(jh) > HOME_NAME_LEN)
153
152
  {
154
- char* p = ALLOCA_N(char, strlen(jh) + 8);
155
- sprintf(p, "%s/..", jh);
156
- jh = p;
153
+ int len = strlen(jh);
154
+ char* p = ALLOCA_N(char, len + 8);
155
+ jh = strcpy(p, jh);
156
+ if (*(jh + len - 1) == '/')
157
+ {
158
+ --len;
159
+ *(jh + len) = '\0';
160
+ }
161
+ if (strcasecmp(jh + len - HOME_NAME_LEN, HOME_NAME) == 0)
162
+ {
163
+ strcpy(p + len, "/..");
164
+ }
157
165
  }
158
166
  }
159
167
  #endif
data/ext/rjb.c CHANGED
@@ -15,7 +15,7 @@
15
15
  * $Id: rjb.c 122 2010-06-05 03:08:29Z arton $
16
16
  */
17
17
 
18
- #define RJB_VERSION "1.2.4"
18
+ #define RJB_VERSION "1.2.5"
19
19
 
20
20
  #include "ruby.h"
21
21
  #include "extconf.h"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rjb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 4
10
- version: 1.2.4
9
+ - 5
10
+ version: 1.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - arton
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-05 00:00:00 +09:00
18
+ date: 2010-06-09 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies: []
21
21