ext/rubypython_bridge/rtop.c in rubypython-0.2.4 vs ext/rubypython_bridge/rtop.c in rubypython-0.2.5

- old
+ new

@@ -44,10 +44,11 @@ VALUE rKeys=rb_funcall(rHash,rb_intern("keys"),0); VALUE rKey,rVal; int i; pDict=PyDict_New(); + for(i=0;i<RARRAY(rKeys)->len;i++) { rKey=rb_ary_entry(rKeys,i); rVal=rb_hash_aref(rHash,rKey); PyDict_SetItem(pDict,rtop_obj(rKey,1),rtop_obj(rVal,0)); @@ -90,10 +91,10 @@ } PyObject* rtop_symbol(VALUE rSymbol) { PyObject* pString; - pString=PyString_FromString(rb_id2name(rSymbol)); + pString=PyString_FromString(STR2CSTR(rb_funcall(rSymbol,rb_intern("to_s"),0))); return pString; } PyObject* rtop_obj(VALUE rObj,int is_key) \ No newline at end of file