Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1035181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:30:23+00:00 2026-05-16T14:30:23+00:00

I have encountered a weird problem twice in the past 2 weeks and it’s

  • 0

I have encountered a weird problem twice in the past 2 weeks and it’s starting to piss me off.

I have this very simple code :

  Rails.logger.debug "Is current_step frozen  ? => #{@current_step.frozen?.inspect}"
  @current_step += 1

Has you can (or not) imagine, this is what is displayed on my console :

Is current_step frozen  ? => false
Completed   in 264ms

TypeError (can't modify frozen object):
  lib/chuguf/core.rb:44:in `upgrade'
  app/controllers/xml/cheat_controller.rb:6:in `index'

Can some one tells me what’s happen here ?

I can give more details if required but i don’t see how other lines could be relevant. All the code is executed in the current thread.

Thanks for your help !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:30:23+00:00Added an answer on May 16, 2026 at 2:30 pm

    You’re not trying to mutate @current_step (which isn’t possible with integers anyway), you’re trying to reassign it. Since reassigning an instance variable means mutating the object the instance variable belongs to (i.e. self), you can only do so if self is not frozen.

    In other words: if you change your debug message to tell your whether self is frozen instead of @current_step, you’ll find out that it is and that’s why you get the error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have encountered a weird situation while updating/upgrading some legacy code. I have a
I have encountered a problem twice now whereby a producer thread produces N work
We have encountered a very strange class not found problem in our web app
I have encountered a weird problem: as far as I know, cache can be
I have encountered a weird problem and I can't manage a way to solve
I have encountered this solution for a problem I tried to solve (uncheck radio
This is the second time that I have this really weird problem with WCF
I am having a very weird CSRF protection problem in CodeIgniter. I have made
I have encountered a very weird behavior while using SimpleDateFormat for parsing a string
Today i have encountered a weird problem when dcommitting my master HEAD to google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.