roelof = "www.codewars.com#about"

def remove_url_anchor(roelof)         # this is declaring a new variable 
as a parameter for the method
   answer =  roelof.gsub(/\#\w+/,"")  # this uses the parameter, not the 
variable you set to "www....."
   puts answer
end

# you need a line like the following to actually use the variable
remove_url_anchor(roelof)





From:   Roelof Wobben <r.wobben / home.nl>
To:     Ruby users <ruby-talk / ruby-lang.org>
Date:   06/06/2014 07:48 AM
Subject:        main.rb:3: warning: assigned but unused variable - roelof
Sent by:        "ruby-talk" <ruby-talk-bounces / ruby-lang.org>



I tried my ruby out on this site : 
http://www.compileonline.com/execute_ruby_online.php

So I have this script :

roelof = "www.codewars.com#about"

def remove_url_anchor(roelof)
   answer =  roelof.gsub(/\#\w+/,"")
   puts answer
end

And it gives this wierd error message . roelof is used on several places.
So why this error message?

Roelof