-
-
Save hannesfostie/3719110d7d6142c0648d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):005:0> class Foo | |
irb(main):006:1> attr_accessor :bar | |
irb(main):007:1> end | |
=> nil | |
irb(main):008:0> foo = Foo.new | |
=> #<Foo:0x007fc4593f9b78> | |
irb(main):009:0> foo.bar = "hello" | |
=> "hello" | |
irb(main):016:0> @test = foo.bar | |
=> "hello" | |
irb(main):017:0> @test.gsub! /llo/, 'lp' | |
=> "help" | |
irb(main):018:0> foo.bar | |
=> "help" | |
irb(main):019:0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment