-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lab 7 - Issues & Observations #1
base: master
Are you sure you want to change the base?
Conversation
Bonus sectionObservation 3Start getting error messages from the git fetch master command: |
Observation 3bError messages continue from that fetch command point in the bonus file: |
Hey @siddtewari thanks for the comments; I've updated a few things.
3a) It should be 3b) I need to see your origin...can you post the output of your 'git remote -v'? Thanks! -Dean |
=> [1, 2, 3] | ||
|
||
=> What do you think the exclamation mark indicates? | ||
Bang makes a permanent change to the object. In this case the array [3,1,2] gets over written by the array [1,2,3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, though it's probably more correct to think of it as array is assigned the 'value' [3,1,2], rather than overwritten, since the variable 'array' is actually the same object after the sort!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Dean! That's good to know.
Thanks for the comparison examples and the exercises. Here are some observations that might help others:
Observation 1 - Use IRB
For part 3 of the README.md, there should be an instruction/tip to use IRB right before this statement:
require '~/devrampup/week7/example_ruby_scripts.rb'
A possible replacement:
Type IRB at the command prompt to launch the Interactive Ruby Shell. Then enter the following command, though replace the command path with the absolute path to the directory where the example ruby scripts file lives:
require '~/devrampup/week7/example_ruby_scripts.rb'
Observation 2
Not sure if these commands were meant to be tried out - they give the following error messages:
1.9.3p327 :017 > name = params['name']
1.9.3p327 :017 > name = params['name']
'NameError: undefined local variable or method
params' for main:Object from (irb):17 from /usr/local/bin/irb:12:in
1.9.3p327 :018 > Blog.posts.where(‘author.name = ?’, name)
1.9.3p327 :018 > Blog.posts.where(‘author.name = ?’, name)
'NameError: uninitialized constant Blog
from (irb):18
from /usr/local/bin/irb:12:in `