Ruby

Vikipediya, ochiq ensiklopediya
Jump to navigation Jump to search
Ruby dasturlash tilining logosi

Ruby interpretatsiyalangan, yuqori darajadagi, umumiy maqsaddagi dasturlash tilidir. Ushbu dasturlash tili 1990-yillarning oʻrtalarida yaponiyalik dasturchi Yukihiro „Matz“ Matsumoto tomonidan yaratilgan.

Versiyalar jadvali[tahrir]

Versiya Eng soʻnggi versiyasi Ilk chiqish sanasi Qoʻllab-quvvatlash fazasining tugashi Xavfsizlikni saqlash fazasi tugashi
Old version, no longer maintained: 1.0 NA 1996-12-25[1] NA NA
Old version, no longer maintained: 1.8 1.8.7-p375[2] 2003-08-04[3] 2012-06[4] 2014-07-01[5]
Old version, no longer maintained: 1.9 1.9.3-p551[6] 2007-12-25[7] 2014-02-23[8] 2015-02-23[9]
Old version, no longer maintained: 2.0 2.0.0-p648[10] 2013-02-24[11] 2015-02-24[10] 2016-02-24[10]
Old version, no longer maintained: 2.1 2.1.10[12] 2013-12-25[13] 2016-03-30[14][15] 2017-03-31[16][17]
Old version, no longer maintained: 2.2 2.2.10[18] 2014-12-25[19] 2017-03-28[20] 2018-03-31[17]
Old version, no longer maintained: 2.3 2.3.8[21] 2015-12-25[22] 2018-06-20[23] 2019-03-31[23]
Old version, no longer maintained: 2.4 2.4.10[24] 2016-12-25[25] 2019-04-01[26] 2020-04-01[26]
Older version, yet still maintained: 2.5 2.5.8[27] 2017-12-25[28] TBA TBA
Older version, yet still maintained: 2.6 2.6.6[29] 2018-12-25[30] TBA TBA
Older version, yet still maintained: 2.7 2.7.2[31] 2019-12-25[32] TBA TBA
Current stable version: 3.0 3.0.0[33] 2020-12-25[34] TBA TBA
<div style="float: left; margin-left: 1em; Expression error: Unrecognized punctuation character "[".">Legend:
<div style="float: left; margin-left: 1em; Expression error: Unrecognized punctuation character "[".">Expression error: Unrecognized punctuation character "[".<div style="float: left; margin-left: 1em; Expression error: Unrecognized punctuation character "[".">Older version, still maintained<div style="float: left; margin-left: 1em; Expression error: Unrecognized punctuation character "[".">Soʻnggi versiyasi<div style="float: left; margin-left: 1em; Expression error: Unrecognized punctuation character "[".">Latest preview version<div style="float: left; margin-left: 1em; Expression error: Unrecognized punctuation character "[".">Kelajakdagi chiqishi

Misollar[tahrir]

Quyidagi misollarni Ruby shellda ishlash mumkin, masalan, Interactive Ruby Shell yoki faylga saqlanadi hamda buyruq satridan ruby <filename> kodini yozish orqali ishga tushiriladi.

Klassic Hello world misoli:

puts 'Hello World!'

Baʼzi bir asosiy Ruby kodlari:

# Everything, including a literal, is an object, so this works:
199.abs # => 199
'ice is niceʼ.length # => 11
'ruby is cool.'.index('u') # => 1
„Nice Day Isnʼt It?“.downcase.split('').uniq.sort.join
# => „ '?acdeinsty


print 'Please type name >'
name = gets.chomp
puts Hello #{name}.“
puts 'Give me a number'
number = gets.chomp
puts number.to_i
output_number = number.to_i + 1
puts output_number.to_s + ' is a bigger number.'

Manbalar[tahrir]

  1. „The Ruby Community's Christmas Releases“. www.rubyinside.com.
  2. „A Patch in Time: Securing Ruby“.
  3. „ruby-1.8.0 released!“. www.ruby-lang.org.
  4. „Plans for 1.8.7“. www.ruby-lang.org.
  5. „EOL for Ruby 1.8.7 and 1.9.2“. www.ruby-lang.org.
  6. „Ruby 1.9.3-p551 Released“. www.ruby-lang.org.
  7. „Ruby 1.9.0 Released“. www.ruby-lang.org.
  8. „Support for Ruby version 1.9.3 will end on February 23, 2015“. www.ruby-lang.org.
  9. „Support for Ruby 1.9.3 has ended“. www.ruby-lang.org.
  10. 10,0 10,1 10,2 „Ruby 2.0.0-p648 Released“. www.ruby-lang.org.
  11. „Ruby 2.0.0-p0 is released“. www.ruby-lang.org.
  12. „Ruby 2.1.10 Released“. www.ruby-lang.org.
  13. „Ruby 2.1.0 is released“. www.ruby-lang.org.
  14. „Support plans for Ruby 2.0.0 and Ruby 2.1“. www.ruby-lang.org.
  15. „Ruby 2.1.9 Released“. www.ruby-lang.org.
  16. „ReleaseEngineering - Ruby - Ruby Issue Tracking System“. bugs.ruby-lang.org.
  17. 17,0 17,1 „Support of Ruby 2.1 has ended“. www.ruby-lang.org.
  18. „Ruby 2.2.10 Released“. www.ruby-lang.org.
  19. „Ruby 2.2.0 Released“. www.ruby-lang.org.
  20. „Ruby 2.2.7 Released“. www.ruby-lang.org.
  21. „Ruby 2.3.8 Released“. www.ruby-lang.org.
  22. „Ruby 2.3.0 Released“. www.ruby-lang.org.
  23. 23,0 23,1 „Support of Ruby 2.2 has ended“. www.ruby-lang.org.
  24. „Ruby 2.4.10 Released“. Ruby Programming Language (31-Mart 2020-yil). Qaraldi: 1-Aprel 2020-yil.
  25. „Ruby 2.4.0 Released“. www.ruby-lang.org.
  26. 26,0 26,1 „Support of Ruby 2.4 has ended“. www.ruby-lang.org.
  27. „Ruby 2.5.8 Released“. Ruby Programming Language (31-Mart 2020-yil). Qaraldi: 1-Aprel 2020-yil.
  28. „Ruby 2.5.0 Released“. www.ruby-lang.org.
  29. „Ruby 2.6.6 Released“. Ruby Programming Language (31-Mart 2020-yil). Qaraldi: 1-Aprel 2020-yil.
  30. „Ruby 2.6.0 Released“. www.ruby-lang.org.
  31. „Ruby 2.7.2 Released“. Ruby Programming Language (2-Oktabr 2020-yil). Qaraldi: 2-Oktabr 2020-yil.
  32. „Ruby 2.7.0 Released“. www.ruby-lang.org.
  33. „Ruby 3.0.0 Released“. Ruby Programming Language (25-Dekabr 2020-yil). Qaraldi: 25-Dekabr 2020-yil.
  34. „Ruby 3.0.0 Released“. www.ruby-lang.org.

Adabiyotlar[tahrir]

Havolalar[tahrir]