Talk:Ruby (programming language)
|This is the talk page for discussing improvements to the Ruby (programming language) article.|
|Archives: Index, 1|
|WikiProject Free Software / Software / Computing||(Rated B-class, High-importance)|
|This talk page is automatically archived by MiszaBot I. Any threads with no replies in 30 days may be automatically moved. Sections without timestamps are not archived.|
Stuff removed from Boolean data type article
The following section was removed from the article Boolean data type:
begin removed text
The Ruby programming language does not have a Boolean data type as part of the language. Like many other interpreted languages, all variables are dynamically typed. Instead, ruby defines the explicit values of
nil, and everything else is considered
true, including 0,
[ ], and the empty string
"". The values
nil can be assigned to variables, returned from functions or methods, and compared in Boolean expressions.
a = 0 if a puts "true" else puts "false" end
will print "true", which might come as a surprise to a new user of the language.
Since Ruby is a pure object-oriented programming language, even the "explicitly" defined values of
nil are objects that each have their own class:
p false.class p true.class p nil.class
Would output "FalseClass", "TrueClass" and "NilClass" respectively.
Does anyone object to me setting up automatic archiving for this page using MiszaBot? Unless otherwise agreed, I would set it to archive threads that have been inactive for 60 days.--Oneiros (talk) 14:51, 5 January 2010 (UTC)
Alternatively, the most recent exception is stored in the magic global
$! really considered a magic global? It feels like an unnecessary adjective. Simply stating "the global
$!" seems adequate.
- All variables that start with a $ are "global variables.2 I do not know who came up with the word "magic global", I think it is a misnomer. Nothing in the source of ruby refers to anything as a "magic global". However, not all global variables are the same in ruby. $1 $2 etc... are somewhat special and volatile, used for regexes. They may tend to "disappear" more rapidly than other variables, when you use a new =~ regex check. 126.96.36.199 (talk) 11:21, 6 February 2013 (UTC)
The ruby site uses the same logo as on this page, which is the one everybody knows. However, one of the news pages on the official site appears to indicate that the official logo is the one that the Ruby Association hosts on their site at http://www.ruby-assn.org/en/logo.htm
Could somebody please check with Matz to see if that is really more official than his own logo (the one currently shown on the page)? —Preceding unsigned comment added by 188.8.131.52 (talk) 06:23, 23 April 2010 (UTC)
- Yes. Matz liked perl, but he felt he could do it better. So he wrote ruby, for his own use (more or less). 184.108.40.206 (talk) 11:19, 6 February 2013 (UTC)
Implementations of Ruby 1.9
The section start off with ...
The newest version of Ruby, the recently released version 1.9, has a single working implementation written in C that utilizes a Ruby-specific virtual machine.
'Repositories and Libraries' not up to date
matz is working on mruby, a light variant of ruby, a bit similar to lua. Should the main article mention mruby eventually? The link to the github page is at: https://github.com/mruby/mruby I suppose one day mruby may be ready, and then the main article could have a small subsection about mruby. 220.127.116.11 (talk) 11:23, 6 February 2013 (UTC)
Please see Wikipedia:Categories_for_discussion/Log/2014_October_24#Category_talk:C_programming_language_family. Andy Dingley (talk) 12:20, 24 October 2014 (UTC)