Questions tagged [ruby-3]

For issues relating to development in Ruby, version 3. If your question applies to Ruby in general, use the tag [ruby].

Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. Ruby 3.0 was released Dec 25, 2020.

For information on Ruby in general, visit . And API documentation for Ruby 3.0.0.

The official release 3.0 announcement summarizes the changes as:

  • Performance
    • MJIT
  • Concurrency
    • Ractor
    • Fiber Scheduler
  • Typing (Static Analysis)
    • RBS
    • TypeProf
82 questions
0
votes
1 answer

rvm install ruby-3.0.0 fails with gcc-8 specific error

rvm install ruby-3.0.0 fails with gcc-8 specific error [2021-03-01 17:27:54] ./configure current path:…
Rpj
  • 5,348
  • 16
  • 62
  • 122
0
votes
1 answer

Is there anyway to call multiple end statement

Is there anyway to call multiple end statement Like I have a for loop and an if-else statement so can I do two ends together like end[2] or end*2 My statement is: a.each do |i| if i<0 then l+=1 elsif i>0 then s+=1 else h+=1 end end Here you can see…
0
votes
0 answers

How to generate Ruby code given a JSON specification of methods and types as input?

Here's a definition of types and methods short version { "name": "Abi", "type": "EnumOfTypes", "enum_types": [ { "name": "Contract", "type": "Struct", "struct_fields": [ { …
michika
  • 11
  • 2
0
votes
0 answers

App unreachable after upgrading to ruby 3/rails 6.1 (demo app provided)

I made a demo that tries to reproduce the issue i face. You could find it here: https://github.com/denisj/app-not-booting. I can't find the reason why the app is not responding. The logs for the app container look like that: Attaching to…
den
  • 51
  • 2
  • 8
0
votes
2 answers

Ruby on rails, How to compare two hashesh value to each other's?

I am trying compare one hash values to another hash values of perticular each key's. like below as db_data = [{"user_id"=>"000879", "dept"=>"1066", "type"=>"A", "rate"=>"999"}, {"user_id"=>"000879", "dept"=>"1066","type"=>"AB",…
vvp.rb
  • 27
  • 4
-1
votes
1 answer

The Number of the Smallest Unoccupied Chair solution in ruby

I am learning ruby and have started practicing problems from leetcode, yesterday I have a problem which I am not able to solve since yesterday. I tried hard doing that in ruby, but not able to do yet. I tried this def give_chair(a) u = a.uniq …
-2
votes
2 answers

remove last character from looping Hash

can you help me to solve this problem with this code? total_user_input = [] while true print "Field Name: " user_input = gets.chomp break if user_input.empty? total_user_input << user_input end total_user_input.each do |input| aa =…
user13103965
1 2 3 4 5
6