Switching Rubinius modes:
- 1.9 mode:
RBXOPT=-X19 ruby foo.rb
- 1.8 mode:
RBXOPT=-X18 ruby foo.rb
Switching JRuby modes:
- 1.9 mode:
JRUBY_OPTS=--1.9 ruby foo.rb
- 1.8 mode:
JRUBY_OPTS=--1.8 ruby foo.rb
# True for Python 2 and Python 3. | |
def foo(bar = []): | |
bar.append(1) | |
print(bar) | |
foo() #=> [1] | |
foo() #=> [1, 1] |
commit e2503bc03d983f2e095bd04c7c3de7ca9b6a2e71 | |
Author: Kyrylo Silin <kyrylosilin@gmail.com> | |
Date: Sun Jan 13 17:37:36 2013 +0200 | |
Ls: slightly change the styling of heading methods | |
diff --git a/lib/pry/commands/ls.rb b/lib/pry/commands/ls.rb | |
index 5349e9e..5bf35f7 100644 | |
--- a/lib/pry/commands/ls.rb | |
+++ b/lib/pry/commands/ls.rb |
#button-babies { | |
position: relative; | |
margin: 0 -80px 1.5em 80px; | |
display: block; | |
float: left; | |
width: 700px; | |
text-align: center; | |
word-spacing: 8px; | |
font-size: 30px; | |
letter-spacing: -2px; |
Switching Rubinius modes:
RBXOPT=-X19 ruby foo.rb
RBXOPT=-X18 ruby foo.rb
Switching JRuby modes:
JRUBY_OPTS=--1.9 ruby foo.rb
JRUBY_OPTS=--1.8 ruby foo.rb
(require 'auto-complete-config) | |
(add-to-list 'ac-dictionary-directories "~/.emacs.d/dict") | |
(ac-config-default) |
[1] pry(main)> HELLO!!! | |
| def answer | |
| :HI! | |
| end | |
NoMethodError: undefined method `HELLO!' for main:Object | |
from (pry):4:in `__pry__' | |
[2] pry(main)> answer | |
=> :"HI!" |
puts "#{ RUBY_VERSION } #{ RUBY_PATCHLEVEL }" #=> "1.8.7 370" | |
nil.frozen? #=> false | |
nil.freeze | |
nil.frozen? #=> false | |
69.frozen? #=> false | |
69.freeze | |
69.frozen? #=> false |
void print_library(const struct book *library, int count); | |
void sort(struct book *library, int count, void (*sorting_method)(struct book *, struct book, int, int)); | |
void alphabetically(struct book *library, struct book temp, int i, int j); | |
void by_value(struct book *library, struct book temp, int i, int j); | |
void print_delim(void); | |
int fltcmp(float a, float b); |