Added: 2 years ago
From: manwithcode
Views: 5,246
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (34)

Sign In or Sign Up now to post a comment!
  • I don't really understand the scan expression. Could you explain more on what (/../) or (/\w\w/) do?

  • @parks709 What's surrounded by the "/"s is called a regular expression. It's a way of processing text. "." means, select any character. "\w" is for whitespace. Regular expressions are a huge topic, so just do a Google search to find out more.

  • You sir, have just earned yourself a subscriber.

  • @CaptainGibbons Excellent! :)

  • @CaptainGibbons lol what a coincidence I subscribed also. . . and I know you XD

  • I am using latest version of ruby interactive on windows 7. When I type "Hello".each_char do [x], the program is giving me an error that says undefined variable. Is there a way to fix this?

  • @whitedragon812 If the code looks the way you posted it in your comments, the problem is a syntax error. There aren't supposed to be square brackets around the x variable, it's supposed to be the pipe character (usually found above the enter key).

    It should look like this: |x|

    Not this: [x]

  • Sometimes Using the Sub and G Sub Method for me don't always work proper. when using the Sub Method instead of it saying Goodbye world and it said Hello world and with G sub instead of saying Goodbye Hello hello it just said Hello Hello Hello, when I re-tried it couple of times it worked .. but it does go back to it not working proper at times.

  • @cashjamesPremium1 Odd. I've never seen this happen before. Are you on Windows? What version of Ruby are you running?

  • @manwithcode i am using windows 7 Ultimate

  • @manwithcode i am Running the Newest Version ,the latest version

  • @cashjamesPremium1 I haven't been able to reproduce the problem you're encountering, are you sure you've typed the code in correctly?

  • Ehh im sorry again, but i just got it u.u its

    x = "name"

    puts x

    very sorry but i don't understand whats the diffrence between

    x = "name"

    or

    x = gets

    Can you plz explain it to me, if its not to late

  • Comment removed

  • I have a question, is there a way to make a name into number?

    I just want to write x = name but it only works with numbers that way.

  • You can use SharpKeys. It’s a small utility that will let you easily map one key to another key easily, or even turn the key off, without having to enter the registry at all. Just google it up.

  • Well everything works fine for me =D

  • (Woah, i accidentally deleted someone's comment when I meant to hit reply, sorry)

    For everyone having trouble finding the pipe character: |, I haven't found a keyboard without it (though all the ones that I come in contact with are usually USA configuration, I haven't checked out any international ones). Keep in mind that it's usually above the enter key, and that it may not look like a complete line, it can have a break in the middle of it. Don't worry, it's still the same key.

  • '.each_char' is not being recognised as a method, do I have to require anything?

    Very informative video's. Do you think you would be able to create some tutorials on Monkeybars?

  • Sorry for taking so long to respond...

    I'm not sure why each_char isn't being recognized, what version of Ruby are you using?

  • Comment removed

  • @Annuix

    try typing in require 'jcode'

  • How do I display a number stored in a variable as a string?

  • It's the same as displaying a string except you have to use the "to underscore s" method on the variable.

    (Youtube is being a pain, the method I talk about has no spaces, and it is the underscore character, not the word)

  • Comment removed

  • I cant get the a = gets to work, whenever I write it in the code and run the program, it spits out "Errno::EBADF occorred

    Bad file descrptor"

  • I've never seen that error before, and I can't figure out how to replicate it.

    Sorry.

  • Thank You

  • Not on mine :P probably different on an EU keyboard. I'll find it in the end, thanks for the response.

    Doing an AS level in Computing in September, so will probably learn more then, but if you could recommend one book to me, what would it be?

    I'm still basically a beginner, i've done some sketchy C++ work, and worked through your video's, but that's about it.

    Thank you :)

  • hmm... from what I can tell, it might the button to the right of left-shift on your keyboard. Try pressing that key with shift and/or alt and see if the right letter pops out.

    As for books, I thought Beginning Ruby From Novice to Professional was good.

  • @manwithcode it doesn't work for me either.

    i tried everything. that character is nowhere to be found it's a major issue i can't do 40% of the things you teach.

  • i cant find the symbol on each end of the x on my keyboard!? where abouts is it?

    Really nice videos, learning alot

  • its above the Enter key

    Glad you like the videos!

  • @manwithcode it's not there please help!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more