Introduction: Assuming that you are a C + + developer, you need to quickly perform some prototyping with Ruby. When you pick up a ruby reference book (such as pickaxe) or browse the Ruby Web site, you'll see some familiar constructs such as class
IRB is an interactive Ruby interface. You can use IRB to debug, run, and experiment Ruby.Code. IRB command line
The command syntax of IRB is as follows:
IRB [Option] [RUBY script] [Script Parameters]
Common options include:
-DSet
Demonstrate Ruby's six characteristics that are easy to be misunderstood with actual code. The Code demonstrates ruby misunderstanding.
Introduction: if you are a C ++ developer, you need to use Ruby to quickly execute some prototype designs. When
Ruby is filled with a series of hidden variables. We can get some interesting information from these predefined global variables.
Global process variable
$ Indicates the currently running ruby process.Copy codeThe Code is as follows: >>$ $=> 17170We
Ruby is filled with a series of hidden variables, and we can get some interesting information from these predefined global variables.
Global process variables
$$ represents the currently running Ruby process.
Copy Code code as follows:
Transferred from: http://www.jb51.net/article/48802.htmRuby is filled with a series of hidden variables, and we can get some interesting information from these pre-defined global variables. Global process variables$$ represents the currently running
Global variables start with $.ProgramBefore initialization, the global variable has a special value nil.
Special variables starting with $ and with a single character are listed here. for example, $ contains the process ID of the Ruby interpreter,
One of the coolest features of Ruby is to extend it using the Application programming interface (API) defined by C + + +. Ruby provides the C header file Ruby.h, which comes with a number of features that you can use to create Ruby classes, modules,
Use C ++ to compile Ruby program extension tutorials.
One of Ruby's coolest features is to extend it using the application programming interface (API) defined in C/C ++. Ruby provides the C header file ruby. h, which is accompanied by many features
Like Perl and Python, Ruby has excellent functionality and is a powerful text-processing language. This article gives a brief introduction to Ruby's text-processing capabilities and how to use Ruby to effectively process text data in different
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.