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
Apple Inc. (NASDAQ: AAPL; previously Apple Computer, Inc.) is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad. Apple software includes the Mac OS X operating system; the iTunes media browser; the iLife suite of multimedia and creativity software; the iWork suite of productivity software; Aperture, a professional photography package; Final Cut Studio, a suite of professional audio and film-industry software products; Logic Studio, a suite of music production tools; and iOS, a mobile operating system. As of August 2010, the company operates 301 retail stores[5] in ten countries,[6] and an online store where hardware and software products are sold. | |
Established on April 1, 1976 in Cupertino, California, and incorporated January 3, 1977,[7] the company was previously named Apple Computer, Inc., for its first 30 years, b |
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
(gdb) r | |
Starting program: /Users/watson/src/macruby-trunk-svn/miniruby /Users/watson/tmp/test_singleton.rb | |
Reading symbols for shared libraries .++++++++................... done | |
Reading symbols for shared libraries . done | |
method : 2.12264622838802e-314 | |
Program received signal EXC_BAD_ACCESS, Could not access memory. | |
Reason: 13 at address: 0x0000000000000000 | |
0x00007fff81d2f700 in _class_getSuperclass () | |
(gdb) bt |
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
/Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/1.9.2/forwardable.rb:185:in `search:': undefined method `html_parser' for nil:NilClass (NoMethodError) | |
from /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mechanize-1.0.0/lib/mechanize/page.rb:208:in `block' | |
from /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mechanize-1.0.0/lib/mechanize/page.rb:207:in `links' | |
from /Users/watson/tmp/test_mechanize.rb:12:in `block' | |
from /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mechanize-1.0.0/lib/mechanize.rb:262:in `get:' | |
from /Users/watson/tmp/test_mechanize.rb:11:in `<main>' |
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
module TestModule | |
include TestModule | |
end |
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
require 'date' | |
p Date.respond_to?(:now) # => false | |
p Date.now | |
__END__ | |
$ macruby test_date.rb | |
true | |
/Users/qoo/tmp/test_date.rb:4:in `<main>': private method `now' called for Date:Class (NoMethodError) |
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
require 'test/unit/assertions.rb' | |
include Test::Unit::Assertions | |
# Array.new should return nil when break from block. | |
ary = Array.new(3) do |i| | |
break if i == 2 | |
i.to_s | |
end | |
assert_nil(ary) |
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
require 'test/unit/assertions.rb' | |
include Test::Unit::Assertions | |
ary = [1, 2, 3] | |
dup = ary.dup | |
ary.sort_by!{ break } | |
assert_equal(ary, dup) | |
puts :ok |
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
require 'test/unit/assertions.rb' | |
include Test::Unit::Assertions | |
module AAA | |
class BBB | |
private | |
def m_private; end | |
protected | |
def m_protected; end |
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
require 'test/unit/assertions.rb' | |
include Test::Unit::Assertions | |
module ConstantSpecs | |
class ParentA | |
CS_CONST20 = :const20_2 | |
end | |
class ContainerA | |
class ChildA < ParentA |
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
require 'test/unit/assertions.rb' | |
include Test::Unit::Assertions | |
class Foo | |
def respond_to_missing?(method, priv= false) | |
#puts "respond_to_missing? : " + method.inspect | |
method | |
end | |
end |