Ruby

Vikipediya, ochiq ensiklopediya
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 | manbasini tahrirlash]

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 | manbasini tahrirlash]

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 | manbasini tahrirlash]

  1. „The Ruby Community's Christmas Releases“. www.rubyinside.com. [sayt ishlamaydi]
  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 23-fevral 2015-yil“. 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 | manbasini tahrirlash]

  • Black, David; Leo, Joseph (15–mart 2019–yil), The Well-Grounded Rubyist (uchinchi-nashr), Manning Publications, 584-bet, ISBN 978-1617295218{{citation}}: CS1 maint: date format ()
  • Metz, Sandi (22–avgust 2018–yil), Practical Object-Oriented Design: An Agile Primer Using Ruby (ikkinchi-nashr), Addison-Wesley Professional, 288-bet, ISBN 978-0-13-445647-8{{citation}}: CS1 maint: date format ()
  • Cooper, Peter (12–iyul 2016–yil), Beginning Ruby: From Novice to Professional (uchinchi-nashr), Apress, 492-bet, ISBN 978-1484212790{{citation}}: CS1 maint: date format ()
  • Carlson, Lucas; Richardson, Leonard (3–aprel 2015–yil), Ruby Cookbook: Recipes for Object-Oriented Scripting (ikkinchi-nashr), O'Reilly Media, 963-bet, ISBN 978-1449373719{{citation}}: CS1 maint: date format ()
  • Fulton, Hal; Arko, André (2–mart 2015–yil), The Ruby Way: Solutions and Techniques in Ruby Programming (uchinchi-nashr), Addison-Wesley Professional, 816-bet, ISBN 978-0-321-71463-3{{citation}}: CS1 maint: date format ()
  • Thomas, Dave; Fowler, Chad; Hunt, Andy (7–iyul 2013–yil), Programming Ruby 1.9 & 2.0: The Pragmatic Programmers' Guide (toʻrtinchi-nashr), Pragmatic Bookshelf, 888-bet, ISBN 978-1937785499{{citation}}: CS1 maint: date format ()
  • McAnally, Jeremy; Arkin, Assaf (28–mart 2009–yil), Ruby in Practice (birinchi-nashr), Manning Publications, 360-bet, ISBN 978-1933988474{{citation}}: CS1 maint: date format ()
  • Flanagan, David; Matsumoto, Yukihiro (25–yanvar 2008–yil), The Ruby Programming Language (birinchi-nashr), O'Reilly Media, 446-bet, ISBN 978-0-596-51617-8{{citation}}: CS1 maint: date format ()
  • Baird, Kevin (8–iyun 2007–yil), Ruby by Example: Concepts and Code (birinchi-nashr), No Starch Press, 326-bet, ISBN 978-1593271480{{citation}}: CS1 maint: date format ()
  • Fitzgerald, Michael (14–may 2007–yil), Learning Ruby (birinchi-nashr), O'Reilly Media, 255-bet, ISBN 978-0-596-52986-4{{citation}}: CS1 maint: date format ()

Havolalar[tahrir | manbasini tahrirlash]