Skip to content

Update ruby-3.0.6 into master - Review PR - #1

Open
amoljoshivelotio wants to merge 1 commit into
masterfrom
ruby-3-0-6-upgrade
Open

Update ruby-3.0.6 into master - Review PR#1
amoljoshivelotio wants to merge 1 commit into
masterfrom
ruby-3-0-6-upgrade

Conversation

@amoljoshivelotio

@amoljoshivelotio amoljoshivelotio commented Apr 18, 2025

Copy link
Copy Markdown

1. Updated ruby to 3.0.6

2. No Automatic Conversion from Hash to Keyword Arguments

Issue: Ruby 3.0 does not automatically convert hashes to keyword arguments.

Example:

def greet(name:, age:)
  puts "Hello, #{name}! You are #{age} years old."
end

params = { name: "Alice", age: 30 }
greet(params)  # Works in Ruby 2.7, but breaks in Ruby 3.0

Fix: Use ** to explicitly convert.

greet(**params)  # Now works in Ruby 3.0

@ashrivastavVelotio ashrivastavVelotio changed the title Update ruby-3.0.6 into master Update ruby-3.0.6 into master - Review PR Apr 29, 2025
@ashrivastavVelotio
ashrivastavVelotio requested review from a team and ashrivastavVelotio May 5, 2025 06:57

@N-Hulley N-Hulley left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants