开发者

hpricot using java?

开发者 https://www.devze.com 2022-12-30 10:59 出处:网络
I\'ve just noticed that a lot of hpricot code is written in java... alt 开发者_开发问答text http://img697.imageshack.us/img697/7447/picture2yw.png

I've just noticed that a lot of hpricot code is written in java...

alt 开发者_开发问答text http://img697.imageshack.us/img697/7447/picture2yw.png

I heard that JRuby performed a lot better than native ruby when processing regular expression. Is maybe the java classes just activated if JRuby or Java is installed and the ruby used if these are not found?

It's something puzzling indeed.

Thanks


Ruby gems can be written in pure Ruby, or have native extensions. In that case, they may have a C extension and/or a java extension. When installing on Ruby MRI and Rubinius, the C extension (and only the C extension) will be used. When installing on JRuby, the Java extension (and only that one) will be used.

hpricot has both, to be compatible with all of these major Ruby implementations.

0

精彩评论

暂无评论...
验证码 换一张
取 消