Ruby语言的出现,为编程人员提供了一个愉悦的编程环境。在这里我们就通过一段简单的Ruby source,来看看Ruby语言的基本概念。#t#

1 从rubyforge下载1.85版的src,解压缩文件到指定目录下。
2 环境准备:我是WindowXp(sp2 jp)+ Cygwin
3 然后打开指定目录下解压缩的readme文件,按照步骤运行命令。
- * How to compile and install  
 - This is what you need to do to compile 
 and install Ruby:   -  
 - 1. If ./configure does not exist or is older 
 than configure.in,   - run autoconf to (re)generate configure.  
 -  
 - 2. Run ./configure, which will generate 
 config.h and Makefile.   -  
 - 3. Edit defines.h if you need. Usually 
 this step will not be needed.   -  
 - 4. Remove comment mark(#) before the 
 module names from ext/Setup (or   - add module names if not present), 
 if you want to link modules   - statically.  
 - If you don't want to compile non 
 static extension modules   - (probably on architectures which does 
 not allow dynamic loading),   - remove comment mark from the
  line "#option nodynamic" in   - ext/Setup.  
 -  
 - 5. Run make.  
 -  
 - 6. Optionally, run 'make test' to check
  whether the compiled Ruby   - interpreter works well. If you see 
 the message "test succeeded",   - your ruby works as it should (hopefully).  
 -  
 - 7. Run 'make install'  
 - You may have to be a super user to install ruby. 
 
编译成功,在usr/local/下面生成了编译后的文件。
            
                分享文章:透过Rubysource了解Ruby真理
                
                本文路径:http://www.csdahua.cn/qtweb/news35/414485.html
            
            
                网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
                                
            
                广告
                
            
            
                声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源:
                快上网