Modify code to support ruby 1.8

DESC: C
Merge branch 'develop' into build