Changeset 307
- Timestamp:
- 01/09/07 11:33:09 (2 years ago)
- Files:
-
- version_0/ext/rubymain.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
version_0/ext/rubymain.cpp
r296 r307 201 201 static VALUE t_connect_server (VALUE self, VALUE server, VALUE port) 202 202 { 203 const char *f = evma_connect_to_server (StringValuePtr(server), FIX2INT(port)); 203 // Avoid FIX2INT in this case, because it doesn't deal with type errors properly. 204 // Specifically, if the value of port comes in as a string rather than an integer, 205 // NUM2INT will throw a type error, but FIX2INT will generate garbage. 206 207 const char *f = evma_connect_to_server (StringValuePtr(server), NUM2INT(port)); 204 208 if (!f || !*f) 205 209 rb_raise (rb_eRuntimeError, "no connection");