vim-jar 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +44 -0
- data/README.md +25 -0
- data/Rakefile +2 -0
- data/TODO.otl +28 -0
- data/bin/vim-jar +62 -0
- data/bundler/ruby/1.8/bin/autospec +19 -0
- data/bundler/ruby/1.8/bin/autotest +21 -0
- data/bundler/ruby/1.8/bin/htmldiff +19 -0
- data/bundler/ruby/1.8/bin/ldiff +19 -0
- data/bundler/ruby/1.8/bin/multigem +21 -0
- data/bundler/ruby/1.8/bin/multiruby +21 -0
- data/bundler/ruby/1.8/bin/multiruby_setup +21 -0
- data/bundler/ruby/1.8/bin/rdebug +19 -0
- data/bundler/ruby/1.8/bin/rspec +19 -0
- data/bundler/ruby/1.8/bin/unit_diff +21 -0
- data/bundler/ruby/1.8/bin/vim-jar +19 -0
- data/bundler/ruby/1.8/bin/zentest +21 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/History.txt +392 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/Manifest.txt +12 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/README.txt +139 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/Rakefile +38 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/demo/fastmath.rb +27 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/demo/hello.rb +13 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/example.rb +86 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/example2.rb +34 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/lib/inline.rb +878 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/test/test_inline.rb +1051 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/tutorial/example1.rb +63 -0
- data/bundler/ruby/1.8/gems/RubyInline-3.8.6/tutorial/example2.rb +96 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/.autotest +21 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/History.txt +709 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/Manifest.txt +35 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/README.txt +109 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/Rakefile +59 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/articles/Article.css +721 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/articles/getting_started_with_autotest.html +533 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/articles/how_to_use_zentest.txt +393 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/bin/autotest +55 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/bin/multigem +4 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/bin/multiruby +76 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/bin/multiruby_setup +74 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/bin/unit_diff +37 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/bin/zentest +28 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/example.txt +42 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/example1.rb +7 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/example2.rb +15 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/example_dot_autotest.rb +12 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest/autoupdate.rb +26 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest/once.rb +9 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest/rcov.rb +27 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest/restart.rb +11 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest/timestamp.rb +9 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest.rb +658 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/focus.rb +21 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/functional_test_matrix.rb +92 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/multiruby.rb +412 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/unit_diff.rb +274 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/zentest.rb +562 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/zentest_mapping.rb +117 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/test/test_autotest.rb +477 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/test/test_focus.rb +35 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/test/test_unit_diff.rb +343 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/test/test_zentest.rb +566 -0
- data/bundler/ruby/1.8/gems/ZenTest-4.4.0/test/test_zentest_mapping.rb +242 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/AUTHORS +1 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/COPYING +340 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/ChangeLog +101 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/Makefile +8 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/NEWS +32 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/README +39 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/Rakefile +84 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/lib/Makefile +7 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/lib/columnize.rb +247 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/lib/version.rb +3 -0
- data/bundler/ruby/1.8/gems/columnize-0.3.2/test/test-columnize.rb +81 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/.require_paths +3 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/LICENSE +51 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/README +158 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/Rakefile +316 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/doc.rb +42 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/Makefile +157 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/conftest.dSYM/Contents/Info.plist +20 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/conftest.dSYM/Contents/Resources/DWARF/conftest +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb.c +373 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb.h +52 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb.o +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_config.h +64 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_core.bundle +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_easy.c +3379 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_easy.h +84 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_easy.o +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_errors.c +637 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_errors.h +129 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_errors.o +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_macros.h +155 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_multi.c +519 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_multi.h +26 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_multi.o +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_postfield.c +522 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_postfield.h +40 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_postfield.o +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_upload.c +80 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_upload.h +30 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/curb_upload.o +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/extconf.rb +177 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/ext/mkmf.log +1088 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/lib/curb.rb +255 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/lib/curb_core.bundle +0 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/lib/curl.rb +2 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/alltests.rb +3 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/bug_curb_easy_blocks_ruby_threads.rb +52 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/bug_curb_easy_post_with_string_no_content_length_header.rb +83 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/bug_instance_post_differs_from_class_post.rb +53 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/bug_multi_segfault.rb +14 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/bug_postfields_crash.rb +26 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/bug_postfields_crash2.rb +57 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/bug_require_last_or_segfault.rb +40 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/bugtests.rb +9 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/helper.rb +182 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/mem_check.rb +65 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/require_last_or_segfault_script.rb +36 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/tc_curl_download.rb +32 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/tc_curl_easy.rb +830 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/tc_curl_multi.rb +461 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/tc_curl_postfield.rb +143 -0
- data/bundler/ruby/1.8/gems/curb-0.7.8/tests/unittests.rb +2 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/History.txt +7 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/License.txt +676 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/Manifest.txt +25 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/README.txt +7 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/Rakefile +4 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/config/hoe.rb +71 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/config/requirements.rb +17 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/lib/curl-multi/version.rb +23 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/lib/curl-multi.rb +374 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/lib/uri-extensions.rb +34 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/log/debug.log +0 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/script/destroy +14 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/script/generate +14 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/script/txt2html +74 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/setup.rb +1585 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/tasks/deployment.rake +34 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/tasks/environment.rake +7 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/tasks/website.rake +17 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/test/test_curl-multi.rb +34 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/test/test_helper.rb +2 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/website/index.html +129 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/website/index.txt +65 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/website/javascripts/rounded_corners_lite.inc.js +285 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/website/stylesheets/screen.css +138 -0
- data/bundler/ruby/1.8/gems/curl-multi-0.2/website/template.rhtml +48 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/ChangeLog +46 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/Install +6 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/README +76 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/Rakefile +116 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/htmldiff +112 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff +45 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/array.rb +21 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/block.rb +51 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/callbacks.rb +322 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/change.rb +169 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/hunk.rb +257 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/ldiff.rb +226 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/string.rb +19 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs.rb +1105 -0
- data/bundler/ruby/1.8/gems/diff-lcs-1.1.2/tests/00test.rb +626 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/.gitignore +1 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/CONTRIBUTORS +12 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/LICENSE +20 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/README.markdown +101 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/Rakefile +47 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/base.rb +38 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/dir.rb +114 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/dir.rb +45 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/file.rb +79 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/symlink.rb +32 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/file.rb +282 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/file_system.rb +136 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fileutils.rb +129 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/safe.rb +11 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/spec_helpers.rb +46 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/version.rb +9 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs.rb +3 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/spec/fakefs/spec_helpers_spec.rb +57 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/spec/spec.opts +1 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/spec/spec_helper.rb +3 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/test/fake/file_test.rb +88 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/test/fake/symlink_test.rb +12 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/test/fakefs_test.rb +1251 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/test/file/stat_test.rb +70 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/test/safe_test.rb +42 -0
- data/bundler/ruby/1.8/gems/fakefs-0.2.1/test/verify.rb +27 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/.gitignore +3 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/.rspec +2 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/Gemfile +4 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/Gemfile.lock +31 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/LICENSE +3 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/README.textile +18 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/fuubar.gemspec +23 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/lib/fuubar.rb +69 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/spec/fuubar_spec.rb +150 -0
- data/bundler/ruby/1.8/gems/fuubar-0.0.2/spec/spec_helper.rb +3 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/AUTHORS +1 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/COPYING +340 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/ChangeLog +317 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/NEWS +29 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/README +38 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/Rakefile +166 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/VERSION +1 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/ext/Makefile +157 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/ext/extconf.rb +16 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/ext/trace_nums.bundle +0 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/ext/trace_nums.c +716 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/ext/trace_nums.h +111 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/ext/trace_nums.o +0 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/lib/linecache.rb +399 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/lib/trace_nums.bundle +0 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/lib/tracelines.rb +47 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/begin1.rb +3 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/begin2.rb +3 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/begin3.rb +6 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/block1.rb +7 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/block2.rb +4 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/case1.rb +6 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/case2.rb +5 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/case3.rb +5 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/case4.rb +4 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/case5.rb +10 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/class1.rb +5 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/comments1.rb +6 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/def1.rb +9 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/each1.rb +3 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/end.rb +3 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/for1.rb +4 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/if1.rb +4 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/if2.rb +4 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/if3.rb +9 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/if4.rb +14 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/if5.rb +7 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/if6.rb +4 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/if7.rb +8 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/match.rb +3 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/match3.rb +5 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/match3a.rb +6 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/data/not-lit.rb +6 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/lnum-diag.rb +130 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/parse-show.rb +14 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/rcov-bug.rb +10 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/short-file +2 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/test-linecache.rb +151 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/test-lnum.rb +36 -0
- data/bundler/ruby/1.8/gems/linecache-0.43/test/test-tracelines.rb +41 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/CHANGES +260 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/Gemfile +6 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/LICENSE +22 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/README.rdoc +385 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/Rakefile +88 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/VERSION.yml +5 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/adapters/rr_methods.rb +146 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/adapters/rspec.rb +61 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/adapters/test_unit.rb +31 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/blank_slate.rb +17 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/class_instance_method_defined.rb +9 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double.rb +154 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/child_double_definition_create.rb +27 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/double_definition.rb +367 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/double_definition_create.rb +139 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/double_definition_create_blank_slate.rb +26 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/double_injections/any_instance_of.rb +28 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/double_injections/instance.rb +16 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/double_injection/any_instance_of.rb +30 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/double_injection/double_injection_strategy.rb +10 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/double_injection/instance.rb +17 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/implementation/implementation_strategy.rb +10 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/implementation/proxy.rb +60 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/implementation/reimplementation.rb +14 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/implementation/strongly_typed_reimplementation.rb +15 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/strategy.rb +43 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/strategy_methods.rb +53 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/verification/dont_allow.rb +31 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/verification/mock.rb +42 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/verification/stub.rb +43 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_definitions/strategies/verification/verification_strategy.rb +10 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/double_matches.rb +42 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/argument_equality_error.rb +6 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/double_definition_error.rb +6 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/double_not_found_error.rb +6 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/double_order_error.rb +6 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/rr_error.rb +20 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/spy_verification_errors/double_injection_not_found_error.rb +8 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/spy_verification_errors/invocation_count_error.rb +8 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/spy_verification_errors/spy_verification_error.rb +8 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/subject_does_not_implement_method_error.rb +6 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/subject_has_different_arity_error.rb +6 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/errors/times_called_error.rb +6 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/expectations/any_argument_expectation.rb +21 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/expectations/argument_equality_expectation.rb +41 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/expectations/times_called_expectation.rb +57 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/hash_with_object_id_key.rb +46 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/injections/double_injection.rb +213 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/injections/injection.rb +33 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/injections/method_missing_injection.rb +68 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/injections/singleton_method_added_injection.rb +72 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/method_dispatches/base_method_dispatch.rb +84 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/method_dispatches/method_dispatch.rb +59 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/method_dispatches/method_missing_dispatch.rb +61 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/proc_from_block.rb +7 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/recorded_calls.rb +103 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/space.rb +112 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/spy_verification.rb +48 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/spy_verification_proxy.rb +13 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/any_times_matcher.rb +18 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/at_least_matcher.rb +15 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/at_most_matcher.rb +23 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/integer_matcher.rb +19 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/never_matcher.rb +23 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/non_terminal.rb +27 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/proc_matcher.rb +11 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/range_matcher.rb +21 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/terminal.rb +20 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/times_called_matchers/times_called_matcher.rb +44 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/anything.rb +18 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/boolean.rb +23 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/duck_type.rb +32 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/hash_including.rb +29 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/is_a.rb +25 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/numeric.rb +13 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/range.rb +7 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/regexp.rb +7 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers/satisfy.rb +26 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr/wildcard_matchers.rb +158 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/lib/rr.rb +99 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/scratch.rb +118 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/any_instance_of/all_instances_of_spec.rb +12 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/any_instance_of/any_instance_of_spec.rb +47 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/any_instance_of/instance_of_spec.rb +12 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb +14 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/mock/mock_spec.rb +193 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/proxy/proxy_spec.rb +86 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/spy/spy_spec.rb +49 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/strong/strong_spec.rb +87 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/api/stub/stub_spec.rb +152 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/core_spec_suite.rb +19 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/environment_fixture_setup.rb +8 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/proc_from_block_spec.rb +14 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/adapters/rr_methods_argument_matcher_spec.rb +67 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/adapters/rr_methods_creator_spec.rb +137 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/adapters/rr_methods_space_spec.rb +98 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/adapters/rr_methods_spec_helper.rb +11 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/adapters/rr_methods_times_matcher_spec.rb +13 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/double_definitions/child_double_definition_creator_spec.rb +112 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/double_definitions/double_definition_create_blank_slate_spec.rb +91 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/double_definitions/double_definition_create_spec.rb +443 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/double_injection/double_injection_spec.rb +546 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/double_injection/double_injection_verify_spec.rb +29 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/errors/rr_error_spec.rb +67 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/any_argument_expectation_spec.rb +47 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/anything_argument_equality_expectation_spec.rb +14 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/argument_equality_expectation_spec.rb +135 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/boolean_argument_equality_expectation_spec.rb +34 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/hash_including_argument_equality_expectation_spec.rb +82 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/hash_including_spec.rb +17 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/satisfy_argument_equality_expectation_spec.rb +59 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/satisfy_spec.rb +14 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/times_called_expectation/times_called_expectation_any_times_spec.rb +22 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/times_called_expectation/times_called_expectation_at_least_spec.rb +37 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/times_called_expectation/times_called_expectation_at_most_spec.rb +43 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb +15 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/times_called_expectation/times_called_expectation_integer_spec.rb +58 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/times_called_expectation/times_called_expectation_proc_spec.rb +35 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/expectations/times_called_expectation/times_called_expectation_range_spec.rb +39 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/rspec/invocation_matcher_spec.rb +279 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/rspec/rspec_adapter_spec.rb +63 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/rspec/rspec_backtrace_tweaking_spec.rb +31 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/rspec/rspec_backtrace_tweaking_spec_fixture.rb +11 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/rspec/rspec_usage_spec.rb +86 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/space/hash_with_object_id_key_spec.rb +88 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/space/space_spec.rb +587 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_helper.rb +7 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb +36 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_unit_integration_test.rb +59 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/times_called_matchers/any_times_matcher_spec.rb +47 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/times_called_matchers/at_least_matcher_spec.rb +55 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/times_called_matchers/at_most_matcher_spec.rb +70 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/times_called_matchers/integer_matcher_spec.rb +70 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/times_called_matchers/proc_matcher_spec.rb +55 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/times_called_matchers/range_matcher_spec.rb +76 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/times_called_matchers/times_called_matcher_spec.rb +118 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/wildcard_matchers/anything_spec.rb +24 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/wildcard_matchers/boolean_spec.rb +36 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/wildcard_matchers/duck_type_spec.rb +52 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/wildcard_matchers/is_a_spec.rb +32 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/wildcard_matchers/numeric_spec.rb +32 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/wildcard_matchers/range_spec.rb +35 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/wildcard_matchers/regexp_spec.rb +43 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rr_spec.rb +28 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/rspec_spec_suite.rb +17 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/spec_helper.rb +37 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/spec_suite.rb +48 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/spy_verification_spec.rb +129 -0
- data/bundler/ruby/1.8/gems/rr-1.0.2/spec/test_unit_spec_suite.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/.document +2 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/.gitignore +7 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/Gemfile +7 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/License.txt +22 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/README.markdown +47 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/Rakefile +16 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/lib/rspec/version.rb +5 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/lib/rspec.rb +4 -0
- data/bundler/ruby/1.8/gems/rspec-2.1.0/rspec.gemspec +29 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/.document +5 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/.gitignore +11 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/.treasure_map.rb +23 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/Gemfile +31 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/Guardfile +5 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/History.markdown +104 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/License.txt +22 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/README.markdown +95 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/Rakefile +71 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/Upgrade.markdown +289 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/autotest/discover.rb +2 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/bin/autospec +13 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/bin/rspec +25 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/cucumber.yml +2 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/README.markdown +19 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/configure.feature +20 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/example_name_option.feature +86 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/exit_status.feature +52 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_appended_to_path.feature +106 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_option.feature +45 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/rake_task.feature +68 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/tag.feature +74 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/configuration/custom_settings.feature +84 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/configuration/fail_fast.feature +77 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/configuration/read_options_from_file.feature +74 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/example_groups/basic_structure.feature +54 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/example_groups/shared_example_group.feature +177 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/filtering/exclusion_filters.feature +115 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/filtering/implicit_filters.feature +166 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/filtering/inclusion_filters.feature +83 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/filtering/run_all_when_everything_filtered.feature +46 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/formatters/custom_formatter.feature +32 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/hooks/around_hooks.feature +320 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/hooks/before_and_after_hooks.feature +432 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/metadata/described_class.feature +17 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/mock_framework_integration/use_flexmock.feature +23 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/mock_framework_integration/use_mocha.feature +23 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/mock_framework_integration/use_rr.feature +23 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/mock_framework_integration/use_rspec.feature +23 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/pending/pending_examples.feature +216 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/step_definitions/additional_cli_steps.rb +11 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/subject/attribute_of_subject.feature +52 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/subject/explicit_subject.feature +62 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/subject/implicit_receiver.feature +29 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/subject/implicit_subject.feature +30 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/features/support/env.rb +1 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/autotest/rspec2.rb +66 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/autorun.rb +2 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/backward_compatibility.rb +48 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/command_line.rb +35 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/command_line_configuration.rb +62 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/configuration.rb +401 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/configuration_options.rb +98 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/deprecation.rb +45 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/drb_command_line.rb +29 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/errors.rb +14 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/example.rb +139 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/example_group.rb +311 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/expecting/with_rspec.rb +11 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/extensions/instance_eval_with_args.rb +39 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/extensions/kernel.rb +5 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/extensions/module_eval_with_args.rb +34 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/extensions/object.rb +14 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/extensions.rb +4 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/formatters/base_formatter.rb +162 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/formatters/base_text_formatter.rb +151 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/formatters/documentation_formatter.rb +71 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/formatters/helpers.rb +28 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/formatters/html_formatter.rb +351 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/formatters/snippet_extractor.rb +52 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/formatters/text_mate_formatter.rb +20 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/hooks.rb +134 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/let.rb +101 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/load_path.rb +3 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/metadata.rb +175 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/mocking/with_flexmock.rb +25 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/mocking/with_mocha.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/mocking/with_rr.rb +25 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/mocking/with_rspec.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/option_parser.rb +122 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/pending.rb +28 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/rake_task.rb +196 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/reporter.rb +79 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/ruby_project.rb +44 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/runner.rb +61 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/shared_example_group.rb +52 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/subject.rb +170 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/version.rb +7 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core/world.rb +102 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/core.rb +62 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/monkey/spork/test_framework/rspec.rb +7 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/lib/rspec/monkey.rb +1 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/rspec-core.gemspec +38 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/script/console +8 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/autotest/failed_results_re_spec.rb +20 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/autotest/rspec_spec.rb +123 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/command_line_configuration_spec.rb +26 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/command_line_spec.rb +134 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/configuration_options_spec.rb +311 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/configuration_spec.rb +662 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/deprecations_spec.rb +45 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/drb_command_line_spec.rb +159 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/example_group_spec.rb +787 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/example_spec.rb +160 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/base_formatter_spec.rb +36 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/base_text_formatter_spec.rb +160 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/documentation_formatter_spec.rb +66 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/helpers_spec.rb +46 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/html_formatted-1.8.6.html +296 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +285 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/html_formatted-1.8.7.html +296 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/html_formatted-1.9.1.html +303 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/html_formatted-1.9.2.html +303 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/html_formatter_spec.rb +81 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/progress_formatter_spec.rb +31 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/snippet_extractor_spec.rb +18 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/text_mate_formatted-1.8.6.html +296 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +280 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +296 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/text_mate_formatted-1.9.1.html +303 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +303 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/formatters/text_mate_formatter_spec.rb +84 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/hooks_filtering_spec.rb +124 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/hooks_spec.rb +57 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/let_spec.rb +42 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/metadata_spec.rb +285 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/option_parser_spec.rb +39 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/pending_example_spec.rb +226 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/rake_task_spec.rb +141 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/reporter_spec.rb +70 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/resources/a_bar.rb +0 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/resources/a_foo.rb +0 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/resources/a_spec.rb +1 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/resources/formatter_specs.rb +54 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/ruby_project_spec.rb +24 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/runner_spec.rb +47 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/shared_example_group_spec.rb +152 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/subject_spec.rb +78 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core/world_spec.rb +174 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/rspec/core_spec.rb +31 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/ruby_forker.rb +13 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/spec_helper.rb +70 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/spec/support/matchers.rb +44 -0
- data/bundler/ruby/1.8/gems/rspec-core-2.1.0/specs.watchr +58 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/.document +5 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/.gitignore +10 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/Gemfile +21 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/History.markdown +54 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/License.txt +22 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/README.markdown +33 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/Rakefile +70 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/Upgrade.markdown +53 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/cucumber.yml +3 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/README.markdown +18 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/attribute_of_subject.feature +19 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/customized_message.feature +54 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/diffing.feature +85 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/implicit_docstrings.feature +52 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/access_running_example.feature +53 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/be_within.feature +43 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/define_diffable_matcher.feature +27 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/define_matcher.feature +311 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/define_matcher_outside_rspec.feature +38 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/equality.feature +142 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/exist.feature +44 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/expect_change.feature +65 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/expect_error.feature +44 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/have.feature +103 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/include.feature +136 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/operators.feature +280 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/predicates.feature +128 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/respond_to.feature +78 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/satisfy.feature +31 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/throw_symbol.feature +85 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/matchers/types.feature +114 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/step_definitions/additional_cli_steps.rb +13 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/support/env.rb +1 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/test_frameworks/test_unit.feature +46 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/backward_compatibility.rb +16 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/deprecation.rb +36 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/differ.rb +62 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/errors.rb +12 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/extensions/array.rb +7 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/extensions/kernel.rb +52 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/extensions.rb +2 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/fail_with.rb +51 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/handler.rb +50 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations/version.rb +7 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/expectations.rb +39 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/be.rb +222 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/be_close.rb +17 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/be_instance_of.rb +26 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/be_kind_of.rb +26 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/be_within.rb +40 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/block_aliases.rb +18 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/change.rb +184 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/compatibility.rb +14 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/dsl.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/eq.rb +50 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/eql.rb +45 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/equal.rb +53 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/errors.rb +5 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/exist.rb +16 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/extensions/instance_exec.rb +31 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/generated_descriptions.rb +36 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/has.rb +35 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/have.rb +151 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/include.rb +51 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/match.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/match_array.rb +71 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/matcher.rb +161 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/method_missing.rb +9 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/operator_matcher.rb +87 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/pretty.rb +37 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/raise_error.rb +130 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/respond_to.rb +85 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/satisfy.rb +51 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers/throw_symbol.rb +121 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec/matchers.rb +196 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/lib/rspec-expectations.rb +1 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/rspec-expectations.gemspec +27 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/expectations/differ_spec.rb +96 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/expectations/extensions/kernel_spec.rb +45 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/expectations/fail_with_spec.rb +70 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/expectations/handler_spec.rb +206 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/be_instance_of_spec.rb +36 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/be_kind_of_spec.rb +33 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/be_spec.rb +456 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/be_within_spec.rb +64 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/change_spec.rb +409 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/compatibility_spec.rb +28 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/description_generation_spec.rb +160 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/dsl_spec.rb +25 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/eq_spec.rb +38 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/eql_spec.rb +37 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/equal_spec.rb +57 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/exist_spec.rb +65 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/has_spec.rb +81 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/have_spec.rb +411 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/include_spec.rb +341 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/match_array_spec.rb +111 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/match_spec.rb +57 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/matcher_spec.rb +374 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/matchers_spec.rb +51 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/operator_matcher_spec.rb +215 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/raise_error_spec.rb +339 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/respond_to_spec.rb +292 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/satisfy_spec.rb +40 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/throw_symbol_spec.rb +113 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/spec_helper.rb +66 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/suite.rb +1 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/support/classes.rb +45 -0
- data/bundler/ruby/1.8/gems/rspec-expectations-2.1.0/specs.watchr +57 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/Rakefile +20 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/Readme.md +48 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/VERSION +1 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/lib/rspec/instafail/rspec_1.rb +27 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/lib/rspec/instafail/rspec_2.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/lib/rspec/instafail.rb +9 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/rspec-instafail.gemspec +51 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/spec/instafail_spec.rb +77 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/spec/rspec_1/Gemfile +2 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/spec/rspec_1/Gemfile.lock +10 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/spec/rspec_1/a_test.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/spec/rspec_2/Gemfile +2 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/spec/rspec_2/Gemfile.lock +20 -0
- data/bundler/ruby/1.8/gems/rspec-instafail-0.1.4/spec/rspec_2/a_test.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/.autotest +7 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/.document +5 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/.gitignore +10 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/Gemfile +18 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/History.markdown +33 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/License.txt +22 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/README.markdown +49 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/Rakefile +70 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/autotest/discover.rb +1 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/cucumber.yml +2 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/README.markdown +30 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/message_expectations/expect_message.feature +94 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/outside_rspec/configuration.feature +82 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/stubs/simple_return_value.feature +55 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/stubs/stub_chain.feature +44 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/stubs/stub_implementation.feature +26 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/features/support/env.rb +2 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/argument_expectation.rb +48 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/argument_matchers.rb +233 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/error_generator.rb +97 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/errors.rb +10 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/extensions/instance_exec.rb +31 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/extensions/marshal.rb +25 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/extensions/object.rb +3 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/framework.rb +17 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/message_expectation.rb +341 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/method_double.rb +165 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/methods.rb +100 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/mock.rb +79 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/order_group.rb +29 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/proxy.rb +157 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/serialization.rb +26 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/space.rb +28 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/spec_methods.rb +53 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/version.rb +7 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks.rb +196 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/spec/mocks.rb +2 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/rspec-mocks.gemspec +25 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/and_yield_spec.rb +114 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/any_number_of_times_spec.rb +36 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/argument_expectation_spec.rb +23 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/at_least_spec.rb +97 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/at_most_spec.rb +93 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/block_return_value_spec.rb +45 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_7611_spec.rb +18 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_7805_spec.rb +22 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_8302_spec.rb +26 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/double_spec.rb +12 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/failing_argument_matchers_spec.rb +96 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/hash_not_including_matcher_spec.rb +67 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/mock_ordering_spec.rb +94 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/mock_space_spec.rb +54 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/mock_spec.rb +661 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/multiple_return_value_spec.rb +133 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/nil_expectation_warning_spec.rb +63 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/null_object_mock_spec.rb +73 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/once_counts_spec.rb +53 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/partial_mock_spec.rb +155 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +94 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/passing_argument_matchers_spec.rb +145 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/precise_counts_spec.rb +52 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/serialization_spec.rb +67 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/stash_spec.rb +27 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/stub_chain_spec.rb +114 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/stub_implementation_spec.rb +68 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/stub_spec.rb +232 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/stubbed_message_expectations_spec.rb +26 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks/twice_counts_spec.rb +67 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/rspec/mocks_spec.rb +51 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/spec/spec_helper.rb +52 -0
- data/bundler/ruby/1.8/gems/rspec-mocks-2.1.0/specs.watchr +57 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/.require_paths +2 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/AUTHORS +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/CHANGES +349 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/ChangeLog +5926 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/LICENSE +23 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/README +114 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/Rakefile +311 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/VERSION +3 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/bin/rdebug +416 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/command.rb +267 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/breakpoints.rb +155 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/catchpoint.rb +55 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/condition.rb +49 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/continue.rb +38 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/control.rb +107 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/disassemble.RB +38 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/display.rb +120 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/edit.rb +48 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/enable.rb +202 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/eval.rb +179 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/finish.rb +42 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/frame.rb +302 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/help.rb +61 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/info.rb +472 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/irb.rb +193 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/kill.rb +50 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/list.rb +94 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/method.rb +84 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/quit.rb +44 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/raise.RB +41 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/reload.rb +40 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/save.rb +90 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/set.rb +237 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/show.rb +251 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/source.RB +44 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/stepping.rb +81 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/threads.rb +189 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/tmate.rb +36 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/trace.rb +57 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/variables.rb +199 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/debugger.rb +5 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/helper.rb +74 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/interface.rb +260 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/processor.rb +556 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug.rb +179 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/doc/rdebug.1 +241 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/rdbg.rb +33 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/runner.sh +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/base/base.rb +74 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/base/binding.rb +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/base/catchpoint.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/base/load.rb +40 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/base/reload_bug.rb +8 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/bp_loop_issue.rb +3 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/brkpt-class-bug.rb +8 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/classes.rb +11 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/catchpoint_test.rb +36 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb +42 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/config.yaml +8 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/annotate.cmd +29 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/annotate.right +139 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/break_bad.cmd +18 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/break_bad.right +28 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/break_loop_bug.cmd +5 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/break_loop_bug.right +15 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/breakpoints.cmd +38 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/breakpoints.right +98 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/brkpt-class-bug.cmd +9 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/brkpt-class-bug.right +18 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/catch.cmd +17 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/catch.right +39 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/condition.cmd +29 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/condition.right +67 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/ctrl.cmd +23 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/ctrl.right +69 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/display.cmd +24 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/display.right +44 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/dollar-0.right +2 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/dollar-0a.right +2 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/dollar-0b.right +2 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/edit.cmd +12 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/edit.right +19 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/emacs_basic.cmd +43 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/emacs_basic.right +106 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/enable.cmd +20 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/enable.right +36 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/except-bug1.cmd +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/except-bug1.right +13 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/file-with-space.cmd +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/file-with-space.right +9 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/finish.cmd +16 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/finish.right +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/frame.cmd +32 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/frame.right +66 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/help.cmd +20 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/help.right +21 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/history.right +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/info-thread.cmd +13 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/info-thread.right +37 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/info-var-bug2.cmd +5 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/info-var-bug2.right +10 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/info-var.cmd +23 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/info-var.right +52 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/info.cmd +22 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/info.right +84 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/linetrace.cmd +6 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/linetrace.right +32 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/linetracep.cmd +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/linetracep.right +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/list.cmd +19 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/list.right +127 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/method.cmd +10 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/method.right +21 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/methodsig.cmd +10 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/methodsig.right +20 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/noquit.right +1 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/output.cmd +6 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/output.right +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/pm-bug.cmd +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/pm-bug.right +12 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/post-mortem-next.cmd +8 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/post-mortem-next.right +14 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/post-mortem-osx.right +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/post-mortem.cmd +13 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/post-mortem.right +32 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/quit.cmd +6 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/quit.right +0 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/raise.cmd +11 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/raise.right +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/save.cmd +33 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/save.right +59 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/setshow.cmd +46 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/setshow.right +80 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/source.cmd +5 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/source.right +15 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/stepping.cmd +21 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/stepping.right +50 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/test-init-cygwin.right +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/test-init-osx.right +4 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/test-init.right +5 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/data/trace.right +23 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/dollar-0.rb +5 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/except-bug1.rb +4 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/except-bug2.rb +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/file with space.rb +1 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/gcd-dbg-nox.rb +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/gcd-dbg.rb +30 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/gcd.rb +18 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/helper.rb +149 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/info-var-bug.rb +47 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/info-var-bug2.rb +2 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/null.rb +1 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/output.rb +2 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/pm-base.rb +22 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/pm-bug.rb +3 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/pm.rb +11 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/raise.rb +3 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/rdebug-save.1 +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/scope-test.rb +8 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/tdebug.rb +252 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-annotate.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-break-bad.rb +36 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-breakpoints.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-brkpt-class-bug.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-catch.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-condition.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-ctrl.rb +55 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-display.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-dollar-0.rb +45 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-edit.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-emacs-basic.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-enable.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-except-bug1.rb +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-file-with-space.rb +30 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-finish.rb +34 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-frame.rb +34 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-help.rb +60 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-hist.rb +68 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-info-thread.rb +32 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-info-var.rb +47 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-info.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-init.rb +49 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-list.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-method.rb +34 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-output.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-pm.rb +59 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-quit.rb +30 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-raise.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-save.rb +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-setshow.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-source.rb +25 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-stepping.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/test-trace.rb +63 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/thread1.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/trunc-call.rb +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/tvar.rb +3 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/AUTHORS +7 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/CHANGES +349 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/LICENSE +23 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/README +114 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/Rakefile +311 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/VERSION +3 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/Makefile +157 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/breakpoint.c +582 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/breakpoint.o +0 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/extconf.rb +20 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/ruby_debug.bundle +0 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/ruby_debug.c +2326 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/ruby_debug.h +123 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/ruby_debug.o +0 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/win32/Makefile +157 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/win32/breakpoint.o +0 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/win32/ruby_debug.o +0 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/ext/win32/ruby_debug.so +0 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/lib/ChangeLog +1162 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/lib/ruby-debug-base.rb +301 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/lib/ruby_debug.bundle +0 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/test/base/base.rb +74 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/test/base/binding.rb +31 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/test/base/catchpoint.rb +26 -0
- data/bundler/ruby/1.8/gems/ruby-debug-base-0.10.4/test/base/reload_bug.rb +8 -0
- data/bundler/ruby/1.8/gems/ruby-progressbar-0.0.9/GPL_LICENSE +340 -0
- data/bundler/ruby/1.8/gems/ruby-progressbar-0.0.9/README.md +91 -0
- data/bundler/ruby/1.8/gems/ruby-progressbar-0.0.9/RUBY_LICENSE +53 -0
- data/bundler/ruby/1.8/gems/ruby-progressbar-0.0.9/lib/progressbar.rb +237 -0
- data/bundler/ruby/1.8/gems/ruby-progressbar-0.0.9/test.rb +116 -0
- data/bundler/ruby/1.8/specifications/RubyInline-3.8.6.gemspec +52 -0
- data/bundler/ruby/1.8/specifications/ZenTest-4.4.0.gemspec +59 -0
- data/bundler/ruby/1.8/specifications/columnize-0.3.2.gemspec +48 -0
- data/bundler/ruby/1.8/specifications/curb-0.7.8.gemspec +32 -0
- data/bundler/ruby/1.8/specifications/curl-multi-0.2.gemspec +39 -0
- data/bundler/ruby/1.8/specifications/diff-lcs-1.1.2.gemspec +34 -0
- data/bundler/ruby/1.8/specifications/fakefs-0.2.1.gemspec +30 -0
- data/bundler/ruby/1.8/specifications/fuubar-0.0.2.gemspec +38 -0
- data/bundler/ruby/1.8/specifications/linecache-0.43.gemspec +33 -0
- data/bundler/ruby/1.8/specifications/rr-1.0.2.gemspec +31 -0
- data/bundler/ruby/1.8/specifications/rspec-2.1.0.gemspec +39 -0
- data/bundler/ruby/1.8/specifications/rspec-core-2.1.0.gemspec +44 -0
- data/bundler/ruby/1.8/specifications/rspec-expectations-2.1.0.gemspec +34 -0
- data/bundler/ruby/1.8/specifications/rspec-instafail-0.1.4.gemspec +28 -0
- data/bundler/ruby/1.8/specifications/rspec-mocks-2.1.0.gemspec +31 -0
- data/bundler/ruby/1.8/specifications/ruby-debug-0.10.4.gemspec +39 -0
- data/bundler/ruby/1.8/specifications/ruby-debug-base-0.10.4.gemspec +39 -0
- data/bundler/ruby/1.8/specifications/ruby-progressbar-0.0.9.gemspec +27 -0
- data/lib/vim-jar/cli.rb +94 -0
- data/lib/vim-jar/config.rb +59 -0
- data/lib/vim-jar/importer/github.rb +18 -0
- data/lib/vim-jar/importer.rb +51 -0
- data/lib/vim-jar/installer/base.rb +9 -0
- data/lib/vim-jar/installer/git.rb +19 -0
- data/lib/vim-jar/installer.rb +7 -0
- data/lib/vim-jar/plugin/git.rb +32 -0
- data/lib/vim-jar/plugin.rb +65 -0
- data/lib/vim-jar/plugins.yml +2673 -0
- data/lib/vim-jar/version.rb +5 -0
- data/lib/vim-jar.rb +24 -0
- data/script/github_crawler.rb +76 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/vim-jar/config_spec.rb +70 -0
- data/spec/vim-jar/importer/github_spec.rb +12 -0
- data/spec/vim-jar/importer/pages/vim-rails-github.html +975 -0
- data/spec/vim-jar/importer_spec.rb +58 -0
- data/spec/vim-jar/plugin_spec.rb +39 -0
- data/spec/vim-jar/plugin_ymls/blank.yml +6 -0
- data/spec/vim-jar/plugin_ymls/rails-vim.yml +7 -0
- data/spec/vim-jar_test.rb +17 -0
- data/vim-jar.gemspec +28 -0
- metadata +1185 -0
@@ -0,0 +1,2326 @@
|
|
1
|
+
#include "ruby_debug.h"
|
2
|
+
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <node.h>
|
5
|
+
#include <rubysig.h>
|
6
|
+
#include <st.h>
|
7
|
+
#include <intern.h>
|
8
|
+
|
9
|
+
#define DEBUG_VERSION "0.10.4"
|
10
|
+
|
11
|
+
#ifdef _WIN32
|
12
|
+
struct FRAME {
|
13
|
+
VALUE self;
|
14
|
+
int argc;
|
15
|
+
ID last_func;
|
16
|
+
ID orig_func;
|
17
|
+
VALUE last_class;
|
18
|
+
struct FRAME *prev;
|
19
|
+
struct FRAME *tmp;
|
20
|
+
struct RNode *node;
|
21
|
+
int iter;
|
22
|
+
int flags;
|
23
|
+
unsigned long uniq;
|
24
|
+
};
|
25
|
+
|
26
|
+
struct SCOPE {
|
27
|
+
struct RBasic super;
|
28
|
+
ID *local_tbl;
|
29
|
+
VALUE *local_vars;
|
30
|
+
int flags;
|
31
|
+
};
|
32
|
+
|
33
|
+
struct RVarmap {
|
34
|
+
struct RBasic super;
|
35
|
+
ID id;
|
36
|
+
VALUE val;
|
37
|
+
struct RVarmap *next;
|
38
|
+
};
|
39
|
+
|
40
|
+
RUBY_EXTERN struct SCOPE *ruby_scope;
|
41
|
+
RUBY_EXTERN struct FRAME *ruby_frame;
|
42
|
+
RUBY_EXTERN struct RVarmap *ruby_dyna_vars;
|
43
|
+
#else
|
44
|
+
#include <env.h>
|
45
|
+
#endif
|
46
|
+
|
47
|
+
#define FRAME_N(n) (&debug_context->frames[debug_context->stack_size-(n)-1])
|
48
|
+
#define GET_FRAME (FRAME_N(check_frame_number(debug_context, frame)))
|
49
|
+
|
50
|
+
#ifndef min
|
51
|
+
#define min(x,y) ((x) < (y) ? (x) : (y))
|
52
|
+
#endif
|
53
|
+
|
54
|
+
#define STACK_SIZE_INCREMENT 128
|
55
|
+
|
56
|
+
typedef struct {
|
57
|
+
st_table *tbl;
|
58
|
+
} threads_table_t;
|
59
|
+
|
60
|
+
static VALUE tracing = Qfalse;
|
61
|
+
static VALUE locker = Qnil;
|
62
|
+
static VALUE post_mortem = Qfalse;
|
63
|
+
static VALUE keep_frame_binding = Qfalse;
|
64
|
+
static VALUE debug = Qfalse;
|
65
|
+
static VALUE track_frame_args = Qfalse;
|
66
|
+
|
67
|
+
static VALUE last_context = Qnil;
|
68
|
+
static VALUE last_thread = Qnil;
|
69
|
+
static debug_context_t *last_debug_context = NULL;
|
70
|
+
|
71
|
+
VALUE rdebug_threads_tbl = Qnil; /* Context for each of the threads */
|
72
|
+
VALUE mDebugger; /* Ruby Debugger Module object */
|
73
|
+
|
74
|
+
static VALUE cThreadsTable;
|
75
|
+
static VALUE cContext;
|
76
|
+
static VALUE cDebugThread;
|
77
|
+
|
78
|
+
static VALUE rb_mObjectSpace;
|
79
|
+
|
80
|
+
static ID idAtBreakpoint;
|
81
|
+
static ID idAtCatchpoint;
|
82
|
+
static ID idAtLine;
|
83
|
+
static ID idAtReturn;
|
84
|
+
static ID idAtTracing;
|
85
|
+
static ID idList;
|
86
|
+
|
87
|
+
static int start_count = 0;
|
88
|
+
static int thnum_max = 0;
|
89
|
+
static int bkp_count = 0;
|
90
|
+
static int last_debugged_thnum = -1;
|
91
|
+
static unsigned long last_check = 0;
|
92
|
+
static unsigned long hook_count = 0;
|
93
|
+
|
94
|
+
static VALUE create_binding(VALUE);
|
95
|
+
static VALUE debug_stop(VALUE);
|
96
|
+
static void save_current_position(debug_context_t *);
|
97
|
+
static VALUE context_copy_args(debug_frame_t *);
|
98
|
+
static VALUE context_copy_locals(debug_frame_t *);
|
99
|
+
static void context_suspend_0(debug_context_t *);
|
100
|
+
static void context_resume_0(debug_context_t *);
|
101
|
+
static void copy_scalar_args(debug_frame_t *);
|
102
|
+
|
103
|
+
typedef struct locked_thread_t {
|
104
|
+
VALUE thread_id;
|
105
|
+
struct locked_thread_t *next;
|
106
|
+
} locked_thread_t;
|
107
|
+
|
108
|
+
static locked_thread_t *locked_head = NULL;
|
109
|
+
static locked_thread_t *locked_tail = NULL;
|
110
|
+
|
111
|
+
/* "Step", "Next" and "Finish" do their work by saving information
|
112
|
+
about where to stop next. reset_stopping_points removes/resets this
|
113
|
+
information. */
|
114
|
+
inline static void
|
115
|
+
reset_stepping_stop_points(debug_context_t *debug_context)
|
116
|
+
{
|
117
|
+
debug_context->dest_frame = -1;
|
118
|
+
debug_context->stop_line = -1;
|
119
|
+
debug_context->stop_next = -1;
|
120
|
+
}
|
121
|
+
|
122
|
+
inline static VALUE
|
123
|
+
real_class(VALUE klass)
|
124
|
+
{
|
125
|
+
if (klass) {
|
126
|
+
if (TYPE(klass) == T_ICLASS) {
|
127
|
+
return RBASIC(klass)->klass;
|
128
|
+
}
|
129
|
+
else if (FL_TEST(klass, FL_SINGLETON)) {
|
130
|
+
return rb_iv_get(klass, "__attached__");
|
131
|
+
}
|
132
|
+
}
|
133
|
+
return klass;
|
134
|
+
}
|
135
|
+
|
136
|
+
inline static void *
|
137
|
+
ruby_method_ptr(VALUE class, ID meth_id)
|
138
|
+
{
|
139
|
+
NODE *body, *method;
|
140
|
+
st_lookup(RCLASS(class)->m_tbl, meth_id, (st_data_t *)&body);
|
141
|
+
method = (NODE *)body->u2.value;
|
142
|
+
return (void *)method->u1.value;
|
143
|
+
}
|
144
|
+
|
145
|
+
inline static VALUE
|
146
|
+
ref2id(VALUE obj)
|
147
|
+
{
|
148
|
+
return rb_obj_id(obj);
|
149
|
+
}
|
150
|
+
|
151
|
+
static VALUE
|
152
|
+
id2ref_unprotected(VALUE id)
|
153
|
+
{
|
154
|
+
typedef VALUE (*id2ref_func_t)(VALUE, VALUE);
|
155
|
+
static id2ref_func_t f_id2ref = NULL;
|
156
|
+
if(f_id2ref == NULL)
|
157
|
+
{
|
158
|
+
f_id2ref = (id2ref_func_t)ruby_method_ptr(rb_mObjectSpace, rb_intern("_id2ref"));
|
159
|
+
}
|
160
|
+
return f_id2ref(rb_mObjectSpace, id);
|
161
|
+
}
|
162
|
+
|
163
|
+
static VALUE
|
164
|
+
id2ref_error()
|
165
|
+
{
|
166
|
+
if(debug == Qtrue)
|
167
|
+
rb_p(ruby_errinfo);
|
168
|
+
return Qnil;
|
169
|
+
}
|
170
|
+
|
171
|
+
static VALUE
|
172
|
+
id2ref(VALUE id)
|
173
|
+
{
|
174
|
+
return rb_rescue(id2ref_unprotected, id, id2ref_error, 0);
|
175
|
+
}
|
176
|
+
|
177
|
+
inline static VALUE
|
178
|
+
context_thread_0(debug_context_t *debug_context)
|
179
|
+
{
|
180
|
+
return id2ref(debug_context->thread_id);
|
181
|
+
}
|
182
|
+
|
183
|
+
static int
|
184
|
+
is_in_locked(VALUE thread_id)
|
185
|
+
{
|
186
|
+
locked_thread_t *node;
|
187
|
+
|
188
|
+
if(!locked_head)
|
189
|
+
return 0;
|
190
|
+
|
191
|
+
for(node = locked_head; node != locked_tail; node = node->next)
|
192
|
+
{
|
193
|
+
if(node->thread_id == thread_id) return 1;
|
194
|
+
}
|
195
|
+
return 0;
|
196
|
+
}
|
197
|
+
|
198
|
+
static void
|
199
|
+
add_to_locked(VALUE thread)
|
200
|
+
{
|
201
|
+
locked_thread_t *node;
|
202
|
+
VALUE thread_id = ref2id(thread);
|
203
|
+
|
204
|
+
if(is_in_locked(thread_id))
|
205
|
+
return;
|
206
|
+
|
207
|
+
node = ALLOC(locked_thread_t);
|
208
|
+
node->thread_id = thread_id;
|
209
|
+
node->next = NULL;
|
210
|
+
if(locked_tail)
|
211
|
+
locked_tail->next = node;
|
212
|
+
locked_tail = node;
|
213
|
+
if(!locked_head)
|
214
|
+
locked_head = node;
|
215
|
+
}
|
216
|
+
|
217
|
+
static VALUE
|
218
|
+
remove_from_locked()
|
219
|
+
{
|
220
|
+
VALUE thread;
|
221
|
+
locked_thread_t *node;
|
222
|
+
|
223
|
+
if(locked_head == NULL)
|
224
|
+
return Qnil;
|
225
|
+
node = locked_head;
|
226
|
+
locked_head = locked_head->next;
|
227
|
+
if(locked_tail == node)
|
228
|
+
locked_tail = NULL;
|
229
|
+
thread = id2ref(node->thread_id);
|
230
|
+
xfree(node);
|
231
|
+
return thread;
|
232
|
+
}
|
233
|
+
|
234
|
+
static int
|
235
|
+
threads_table_mark_keyvalue(VALUE key, VALUE value, int dummy)
|
236
|
+
{
|
237
|
+
rb_gc_mark(value);
|
238
|
+
return ST_CONTINUE;
|
239
|
+
}
|
240
|
+
|
241
|
+
static void
|
242
|
+
threads_table_mark(void* data)
|
243
|
+
{
|
244
|
+
threads_table_t *threads_table = (threads_table_t*)data;
|
245
|
+
st_foreach(threads_table->tbl, threads_table_mark_keyvalue, 0);
|
246
|
+
}
|
247
|
+
|
248
|
+
static void
|
249
|
+
threads_table_free(void* data)
|
250
|
+
{
|
251
|
+
threads_table_t *threads_table = (threads_table_t*)data;
|
252
|
+
st_free_table(threads_table->tbl);
|
253
|
+
xfree(threads_table);
|
254
|
+
}
|
255
|
+
|
256
|
+
static VALUE
|
257
|
+
threads_table_create()
|
258
|
+
{
|
259
|
+
threads_table_t *threads_table;
|
260
|
+
|
261
|
+
threads_table = ALLOC(threads_table_t);
|
262
|
+
threads_table->tbl = st_init_numtable();
|
263
|
+
return Data_Wrap_Struct(cThreadsTable, threads_table_mark, threads_table_free, threads_table);
|
264
|
+
}
|
265
|
+
|
266
|
+
static int
|
267
|
+
threads_table_clear_i(VALUE key, VALUE value, VALUE dummy)
|
268
|
+
{
|
269
|
+
return ST_DELETE;
|
270
|
+
}
|
271
|
+
|
272
|
+
static void
|
273
|
+
threads_table_clear(VALUE table)
|
274
|
+
{
|
275
|
+
threads_table_t *threads_table;
|
276
|
+
|
277
|
+
Data_Get_Struct(table, threads_table_t, threads_table);
|
278
|
+
st_foreach(threads_table->tbl, threads_table_clear_i, 0);
|
279
|
+
}
|
280
|
+
|
281
|
+
static VALUE
|
282
|
+
is_thread_alive(VALUE thread)
|
283
|
+
{
|
284
|
+
typedef VALUE (*thread_alive_func_t)(VALUE);
|
285
|
+
static thread_alive_func_t f_thread_alive = NULL;
|
286
|
+
if(!f_thread_alive)
|
287
|
+
{
|
288
|
+
f_thread_alive = (thread_alive_func_t)ruby_method_ptr(rb_cThread, rb_intern("alive?"));
|
289
|
+
}
|
290
|
+
return f_thread_alive(thread);
|
291
|
+
}
|
292
|
+
|
293
|
+
static int
|
294
|
+
threads_table_check_i(VALUE key, VALUE value, VALUE dummy)
|
295
|
+
{
|
296
|
+
VALUE thread;
|
297
|
+
|
298
|
+
thread = id2ref(key);
|
299
|
+
if(!rb_obj_is_kind_of(thread, rb_cThread))
|
300
|
+
{
|
301
|
+
return ST_DELETE;
|
302
|
+
}
|
303
|
+
if(rb_protect(is_thread_alive, thread, 0) != Qtrue)
|
304
|
+
{
|
305
|
+
return ST_DELETE;
|
306
|
+
}
|
307
|
+
return ST_CONTINUE;
|
308
|
+
}
|
309
|
+
|
310
|
+
static void
|
311
|
+
check_thread_contexts()
|
312
|
+
{
|
313
|
+
threads_table_t *threads_table;
|
314
|
+
|
315
|
+
Data_Get_Struct(rdebug_threads_tbl, threads_table_t, threads_table);
|
316
|
+
st_foreach(threads_table->tbl, threads_table_check_i, 0);
|
317
|
+
}
|
318
|
+
|
319
|
+
/*
|
320
|
+
* call-seq:
|
321
|
+
* Debugger.started? -> bool
|
322
|
+
*
|
323
|
+
* Returns +true+ the debugger is started.
|
324
|
+
*/
|
325
|
+
static VALUE
|
326
|
+
debug_is_started(VALUE self)
|
327
|
+
{
|
328
|
+
return IS_STARTED ? Qtrue : Qfalse;
|
329
|
+
}
|
330
|
+
|
331
|
+
static void
|
332
|
+
debug_context_mark(void *data)
|
333
|
+
{
|
334
|
+
debug_frame_t *frame;
|
335
|
+
int i;
|
336
|
+
|
337
|
+
debug_context_t *debug_context = (debug_context_t *)data;
|
338
|
+
for(i = 0; i < debug_context->stack_size; i++)
|
339
|
+
{
|
340
|
+
frame = &(debug_context->frames[i]);
|
341
|
+
rb_gc_mark(frame->binding);
|
342
|
+
rb_gc_mark(frame->self);
|
343
|
+
rb_gc_mark(frame->arg_ary);
|
344
|
+
if(frame->dead)
|
345
|
+
{
|
346
|
+
rb_gc_mark(frame->info.copy.locals);
|
347
|
+
rb_gc_mark(frame->info.copy.args);
|
348
|
+
}
|
349
|
+
}
|
350
|
+
rb_gc_mark(debug_context->breakpoint);
|
351
|
+
}
|
352
|
+
|
353
|
+
static void
|
354
|
+
debug_context_free(void *data)
|
355
|
+
{
|
356
|
+
debug_context_t *debug_context = (debug_context_t *)data;
|
357
|
+
xfree(debug_context->frames);
|
358
|
+
}
|
359
|
+
|
360
|
+
static VALUE
|
361
|
+
debug_context_create(VALUE thread)
|
362
|
+
{
|
363
|
+
debug_context_t *debug_context;
|
364
|
+
|
365
|
+
debug_context = ALLOC(debug_context_t);
|
366
|
+
debug_context-> thnum = ++thnum_max;
|
367
|
+
|
368
|
+
debug_context->last_file = NULL;
|
369
|
+
debug_context->last_line = 0;
|
370
|
+
debug_context->flags = 0;
|
371
|
+
|
372
|
+
debug_context->stop_next = -1;
|
373
|
+
debug_context->dest_frame = -1;
|
374
|
+
debug_context->stop_line = -1;
|
375
|
+
debug_context->stop_frame = -1;
|
376
|
+
debug_context->stop_reason = CTX_STOP_NONE;
|
377
|
+
debug_context->stack_len = STACK_SIZE_INCREMENT;
|
378
|
+
debug_context->frames = ALLOC_N(debug_frame_t, STACK_SIZE_INCREMENT);
|
379
|
+
debug_context->stack_size = 0;
|
380
|
+
debug_context->thread_id = ref2id(thread);
|
381
|
+
debug_context->breakpoint = Qnil;
|
382
|
+
if(rb_obj_class(thread) == cDebugThread)
|
383
|
+
CTX_FL_SET(debug_context, CTX_FL_IGNORE);
|
384
|
+
return Data_Wrap_Struct(cContext, debug_context_mark, debug_context_free, debug_context);
|
385
|
+
}
|
386
|
+
|
387
|
+
static VALUE
|
388
|
+
debug_context_dup(debug_context_t *debug_context)
|
389
|
+
{
|
390
|
+
debug_context_t *new_debug_context;
|
391
|
+
debug_frame_t *new_frame, *old_frame;
|
392
|
+
int i;
|
393
|
+
|
394
|
+
new_debug_context = ALLOC(debug_context_t);
|
395
|
+
memcpy(new_debug_context, debug_context, sizeof(debug_context_t));
|
396
|
+
new_debug_context->stop_next = -1;
|
397
|
+
new_debug_context->dest_frame = -1;
|
398
|
+
new_debug_context->stop_line = -1;
|
399
|
+
new_debug_context->stop_frame = -1;
|
400
|
+
new_debug_context->breakpoint = Qnil;
|
401
|
+
CTX_FL_SET(new_debug_context, CTX_FL_DEAD);
|
402
|
+
new_debug_context->frames = ALLOC_N(debug_frame_t, debug_context->stack_size);
|
403
|
+
new_debug_context->stack_len = debug_context->stack_size;
|
404
|
+
memcpy(new_debug_context->frames, debug_context->frames, sizeof(debug_frame_t) * debug_context->stack_size);
|
405
|
+
for(i = 0; i < debug_context->stack_size; i++)
|
406
|
+
{
|
407
|
+
new_frame = &(new_debug_context->frames[i]);
|
408
|
+
old_frame = &(debug_context->frames[i]);
|
409
|
+
new_frame->dead = 1;
|
410
|
+
new_frame->info.copy.args = context_copy_args(old_frame);
|
411
|
+
new_frame->info.copy.locals = context_copy_locals(old_frame);
|
412
|
+
}
|
413
|
+
return Data_Wrap_Struct(cContext, debug_context_mark, debug_context_free, new_debug_context);
|
414
|
+
}
|
415
|
+
|
416
|
+
static void
|
417
|
+
thread_context_lookup(VALUE thread, VALUE *context, debug_context_t **debug_context)
|
418
|
+
{
|
419
|
+
threads_table_t *threads_table;
|
420
|
+
VALUE thread_id;
|
421
|
+
debug_context_t *l_debug_context;
|
422
|
+
|
423
|
+
debug_check_started();
|
424
|
+
|
425
|
+
if(last_thread == thread && last_context != Qnil)
|
426
|
+
{
|
427
|
+
*context = last_context;
|
428
|
+
if(debug_context)
|
429
|
+
*debug_context = last_debug_context;
|
430
|
+
return;
|
431
|
+
}
|
432
|
+
thread_id = ref2id(thread);
|
433
|
+
Data_Get_Struct(rdebug_threads_tbl, threads_table_t, threads_table);
|
434
|
+
if(!st_lookup(threads_table->tbl, thread_id, context))
|
435
|
+
{
|
436
|
+
*context = debug_context_create(thread);
|
437
|
+
st_insert(threads_table->tbl, thread_id, *context);
|
438
|
+
}
|
439
|
+
|
440
|
+
Data_Get_Struct(*context, debug_context_t, l_debug_context);
|
441
|
+
if(debug_context)
|
442
|
+
*debug_context = l_debug_context;
|
443
|
+
|
444
|
+
last_thread = thread;
|
445
|
+
last_context = *context;
|
446
|
+
last_debug_context = l_debug_context;
|
447
|
+
}
|
448
|
+
|
449
|
+
static VALUE
|
450
|
+
call_at_line_unprotected(VALUE args)
|
451
|
+
{
|
452
|
+
VALUE context;
|
453
|
+
context = *RARRAY(args)->ptr;
|
454
|
+
return rb_funcall2(context, idAtLine, RARRAY(args)->len - 1, RARRAY(args)->ptr + 1);
|
455
|
+
}
|
456
|
+
|
457
|
+
static VALUE
|
458
|
+
call_at_line(VALUE context, debug_context_t *debug_context, VALUE file, VALUE line)
|
459
|
+
{
|
460
|
+
VALUE args;
|
461
|
+
|
462
|
+
last_debugged_thnum = debug_context->thnum;
|
463
|
+
save_current_position(debug_context);
|
464
|
+
|
465
|
+
args = rb_ary_new3(3, context, file, line);
|
466
|
+
return rb_protect(call_at_line_unprotected, args, 0);
|
467
|
+
}
|
468
|
+
|
469
|
+
static void
|
470
|
+
save_call_frame(rb_event_t event, VALUE self, char *file, int line, ID mid, debug_context_t *debug_context)
|
471
|
+
{
|
472
|
+
VALUE binding;
|
473
|
+
debug_frame_t *debug_frame;
|
474
|
+
int frame_n;
|
475
|
+
|
476
|
+
binding = self && RTEST(keep_frame_binding)? create_binding(self) : Qnil;
|
477
|
+
|
478
|
+
frame_n = debug_context->stack_size++;
|
479
|
+
if(frame_n >= debug_context->stack_len)
|
480
|
+
{
|
481
|
+
debug_context->stack_len += STACK_SIZE_INCREMENT;
|
482
|
+
REALLOC_N(debug_context->frames, debug_frame_t, debug_context->stack_len);
|
483
|
+
}
|
484
|
+
debug_frame = &debug_context->frames[frame_n];
|
485
|
+
debug_frame->argc = ruby_frame->argc;
|
486
|
+
debug_frame->file = file;
|
487
|
+
debug_frame->line = line;
|
488
|
+
debug_frame->binding = binding;
|
489
|
+
debug_frame->id = mid;
|
490
|
+
debug_frame->orig_id = mid;
|
491
|
+
debug_frame->dead = 0;
|
492
|
+
debug_frame->self = self;
|
493
|
+
debug_frame->arg_ary = Qnil;
|
494
|
+
debug_frame->info.runtime.frame = ruby_frame;
|
495
|
+
debug_frame->info.runtime.scope = ruby_scope;
|
496
|
+
debug_frame->info.runtime.dyna_vars = event == RUBY_EVENT_LINE ? ruby_dyna_vars : NULL;
|
497
|
+
if (RTEST(track_frame_args))
|
498
|
+
copy_scalar_args(debug_frame);
|
499
|
+
}
|
500
|
+
|
501
|
+
|
502
|
+
#if defined DOSISH
|
503
|
+
#define isdirsep(x) ((x) == '/' || (x) == '\\')
|
504
|
+
#else
|
505
|
+
#define isdirsep(x) ((x) == '/')
|
506
|
+
#endif
|
507
|
+
|
508
|
+
int
|
509
|
+
filename_cmp(VALUE source, char *file)
|
510
|
+
{
|
511
|
+
char *source_ptr, *file_ptr;
|
512
|
+
int s_len, f_len, min_len;
|
513
|
+
int s,f;
|
514
|
+
int dirsep_flag = 0;
|
515
|
+
|
516
|
+
s_len = RSTRING(source)->len;
|
517
|
+
f_len = strlen(file);
|
518
|
+
min_len = min(s_len, f_len);
|
519
|
+
|
520
|
+
source_ptr = RSTRING(source)->ptr;
|
521
|
+
file_ptr = file;
|
522
|
+
|
523
|
+
for( s = s_len - 1, f = f_len - 1; s >= s_len - min_len && f >= f_len - min_len; s--, f-- )
|
524
|
+
{
|
525
|
+
if((source_ptr[s] == '.' || file_ptr[f] == '.') && dirsep_flag)
|
526
|
+
return 1;
|
527
|
+
if(isdirsep(source_ptr[s]) && isdirsep(file_ptr[f]))
|
528
|
+
dirsep_flag = 1;
|
529
|
+
else if(source_ptr[s] != file_ptr[f])
|
530
|
+
return 0;
|
531
|
+
}
|
532
|
+
return 1;
|
533
|
+
}
|
534
|
+
|
535
|
+
/*
|
536
|
+
* A nasty hack to be able to get at the +Kernel.binding+ method.
|
537
|
+
* +rb_f_binding+ is declared static in eval.c. So copy and save our own value
|
538
|
+
* of it by looking up the method name in the Kernel module.
|
539
|
+
*/
|
540
|
+
static VALUE
|
541
|
+
create_binding(VALUE self)
|
542
|
+
{
|
543
|
+
typedef VALUE (*bind_func_t)(VALUE);
|
544
|
+
static bind_func_t f_binding = NULL;
|
545
|
+
|
546
|
+
if(f_binding == NULL)
|
547
|
+
{
|
548
|
+
f_binding = (bind_func_t)ruby_method_ptr(rb_mKernel, rb_intern("binding"));
|
549
|
+
}
|
550
|
+
return f_binding(self);
|
551
|
+
}
|
552
|
+
|
553
|
+
inline static debug_frame_t *
|
554
|
+
get_top_frame(debug_context_t *debug_context)
|
555
|
+
{
|
556
|
+
if(debug_context->stack_size == 0)
|
557
|
+
return NULL;
|
558
|
+
else
|
559
|
+
return &(debug_context->frames[debug_context->stack_size-1]);
|
560
|
+
}
|
561
|
+
|
562
|
+
inline static void
|
563
|
+
save_top_binding(debug_context_t *debug_context, VALUE binding)
|
564
|
+
{
|
565
|
+
debug_frame_t *debug_frame;
|
566
|
+
debug_frame = get_top_frame(debug_context);
|
567
|
+
if(debug_frame)
|
568
|
+
debug_frame->binding = binding;
|
569
|
+
}
|
570
|
+
|
571
|
+
inline static void
|
572
|
+
set_frame_source(rb_event_t event, debug_context_t *debug_context, VALUE self, char *file, int line, ID mid)
|
573
|
+
{
|
574
|
+
debug_frame_t *top_frame;
|
575
|
+
top_frame = get_top_frame(debug_context);
|
576
|
+
if(top_frame)
|
577
|
+
{
|
578
|
+
top_frame->self = self;
|
579
|
+
top_frame->file = file;
|
580
|
+
top_frame->line = line;
|
581
|
+
top_frame->id = mid;
|
582
|
+
top_frame->info.runtime.dyna_vars = event == RUBY_EVENT_C_CALL ? NULL : ruby_dyna_vars;
|
583
|
+
}
|
584
|
+
}
|
585
|
+
|
586
|
+
inline static void
|
587
|
+
reset_frame_mid(debug_context_t *debug_context)
|
588
|
+
{
|
589
|
+
debug_frame_t *top_frame;
|
590
|
+
top_frame = get_top_frame(debug_context);
|
591
|
+
if(top_frame)
|
592
|
+
{
|
593
|
+
top_frame->id = 0;
|
594
|
+
}
|
595
|
+
}
|
596
|
+
|
597
|
+
static void
|
598
|
+
save_current_position(debug_context_t *debug_context)
|
599
|
+
{
|
600
|
+
debug_frame_t *debug_frame;
|
601
|
+
|
602
|
+
debug_frame = get_top_frame(debug_context);
|
603
|
+
if(!debug_frame) return;
|
604
|
+
debug_context->last_file = debug_frame->file;
|
605
|
+
debug_context->last_line = debug_frame->line;
|
606
|
+
CTX_FL_UNSET(debug_context, CTX_FL_ENABLE_BKPT);
|
607
|
+
CTX_FL_UNSET(debug_context, CTX_FL_STEPPED);
|
608
|
+
CTX_FL_UNSET(debug_context, CTX_FL_FORCE_MOVE);
|
609
|
+
}
|
610
|
+
|
611
|
+
inline static char *
|
612
|
+
get_event_name(rb_event_t event)
|
613
|
+
{
|
614
|
+
switch (event) {
|
615
|
+
case RUBY_EVENT_LINE:
|
616
|
+
return "line";
|
617
|
+
case RUBY_EVENT_CLASS:
|
618
|
+
return "class";
|
619
|
+
case RUBY_EVENT_END:
|
620
|
+
return "end";
|
621
|
+
case RUBY_EVENT_CALL:
|
622
|
+
return "call";
|
623
|
+
case RUBY_EVENT_RETURN:
|
624
|
+
return "return";
|
625
|
+
case RUBY_EVENT_C_CALL:
|
626
|
+
return "c-call";
|
627
|
+
case RUBY_EVENT_C_RETURN:
|
628
|
+
return "c-return";
|
629
|
+
case RUBY_EVENT_RAISE:
|
630
|
+
return "raise";
|
631
|
+
default:
|
632
|
+
return "unknown";
|
633
|
+
}
|
634
|
+
}
|
635
|
+
|
636
|
+
inline static int
|
637
|
+
c_call_new_frame_p(VALUE klass, ID mid)
|
638
|
+
{
|
639
|
+
klass = real_class(klass);
|
640
|
+
if(rb_block_given_p()) return 1;
|
641
|
+
if(klass == rb_cProc || klass == rb_mKernel || klass == rb_cModule) return 1;
|
642
|
+
return 0;
|
643
|
+
}
|
644
|
+
|
645
|
+
static void
|
646
|
+
debug_event_hook(rb_event_t event, NODE *node, VALUE self, ID mid, VALUE klass)
|
647
|
+
{
|
648
|
+
VALUE thread, context;
|
649
|
+
VALUE breakpoint = Qnil, binding = Qnil;
|
650
|
+
debug_context_t *debug_context;
|
651
|
+
char *file = NULL;
|
652
|
+
int line = 0, moved = 0;
|
653
|
+
|
654
|
+
hook_count++;
|
655
|
+
|
656
|
+
if (mid == ID_ALLOCATOR) return;
|
657
|
+
|
658
|
+
thread = rb_thread_current();
|
659
|
+
thread_context_lookup(thread, &context, &debug_context);
|
660
|
+
|
661
|
+
/* return if thread is marked as 'ignored'.
|
662
|
+
debugger's threads are marked this way
|
663
|
+
*/
|
664
|
+
if(CTX_FL_TEST(debug_context, CTX_FL_IGNORE)) return;
|
665
|
+
|
666
|
+
while(1)
|
667
|
+
{
|
668
|
+
/* halt execution of the current thread if the debugger
|
669
|
+
is activated in another
|
670
|
+
*/
|
671
|
+
while(locker != Qnil && locker != thread)
|
672
|
+
{
|
673
|
+
add_to_locked(thread);
|
674
|
+
rb_thread_stop();
|
675
|
+
}
|
676
|
+
|
677
|
+
/* stop the current thread if it's marked as suspended */
|
678
|
+
if(CTX_FL_TEST(debug_context, CTX_FL_SUSPEND) && locker != thread)
|
679
|
+
{
|
680
|
+
CTX_FL_SET(debug_context, CTX_FL_WAS_RUNNING);
|
681
|
+
rb_thread_stop();
|
682
|
+
}
|
683
|
+
else break;
|
684
|
+
}
|
685
|
+
|
686
|
+
/* return if the current thread is the locker */
|
687
|
+
if(locker != Qnil) return;
|
688
|
+
|
689
|
+
/* only the current thread can proceed */
|
690
|
+
locker = thread;
|
691
|
+
|
692
|
+
/* ignore a skipped section of code */
|
693
|
+
if(CTX_FL_TEST(debug_context, CTX_FL_SKIPPED)) goto cleanup;
|
694
|
+
|
695
|
+
if(node)
|
696
|
+
{
|
697
|
+
file = node->nd_file;
|
698
|
+
line = nd_line(node);
|
699
|
+
|
700
|
+
if(debug == Qtrue)
|
701
|
+
fprintf(stderr, "%s:%d [%s] %s\n", file, line, get_event_name(event), rb_id2name(mid));
|
702
|
+
|
703
|
+
/* There can be many event calls per line, but we only want
|
704
|
+
*one* breakpoint per line. */
|
705
|
+
if(debug_context->last_line != line || debug_context->last_file == NULL ||
|
706
|
+
strcmp(debug_context->last_file, file) != 0)
|
707
|
+
{
|
708
|
+
CTX_FL_SET(debug_context, CTX_FL_ENABLE_BKPT);
|
709
|
+
moved = 1;
|
710
|
+
}
|
711
|
+
else if(event == RUBY_EVENT_LINE)
|
712
|
+
{
|
713
|
+
/* There are two line-event trace hook calls per IF node - one
|
714
|
+
before the expression eval an done afterwards.
|
715
|
+
*/
|
716
|
+
/* FIXME: the static variable can't be safely used here, since this method
|
717
|
+
is re-entrant by multiple threads. If we want to provide this kind of functionality
|
718
|
+
if_eval_event variable must be moved to debug_context structure.
|
719
|
+
*/
|
720
|
+
/*
|
721
|
+
static int if_eval_event = 0;
|
722
|
+
if_eval_event = (NODE_IF == nd_type(node)) ? !if_eval_event : 0;
|
723
|
+
if (!if_eval_event)
|
724
|
+
{
|
725
|
+
CTX_FL_SET(debug_context, CTX_FL_ENABLE_BKPT);
|
726
|
+
}
|
727
|
+
*/
|
728
|
+
}
|
729
|
+
}
|
730
|
+
else if(event != RUBY_EVENT_RETURN && event != RUBY_EVENT_C_RETURN)
|
731
|
+
{
|
732
|
+
if(debug == Qtrue)
|
733
|
+
fprintf(stderr, "nodeless [%s] %s\n", get_event_name(event), rb_id2name(mid));
|
734
|
+
goto cleanup;
|
735
|
+
}
|
736
|
+
else
|
737
|
+
{
|
738
|
+
if(debug == Qtrue)
|
739
|
+
fprintf(stderr, "nodeless [%s] %s\n", get_event_name(event), rb_id2name(mid));
|
740
|
+
}
|
741
|
+
|
742
|
+
if(event != RUBY_EVENT_LINE)
|
743
|
+
CTX_FL_SET(debug_context, CTX_FL_STEPPED);
|
744
|
+
|
745
|
+
switch(event)
|
746
|
+
{
|
747
|
+
case RUBY_EVENT_LINE:
|
748
|
+
{
|
749
|
+
|
750
|
+
if(debug_context->stack_size == 0)
|
751
|
+
save_call_frame(event, self, file, line, mid, debug_context);
|
752
|
+
else
|
753
|
+
set_frame_source(event, debug_context, self, file, line, mid);
|
754
|
+
|
755
|
+
if(RTEST(tracing) || CTX_FL_TEST(debug_context, CTX_FL_TRACING))
|
756
|
+
rb_funcall(context, idAtTracing, 2, rb_str_new2(file), INT2FIX(line));
|
757
|
+
|
758
|
+
if(debug_context->dest_frame == -1 ||
|
759
|
+
debug_context->stack_size == debug_context->dest_frame)
|
760
|
+
{
|
761
|
+
if(moved || !CTX_FL_TEST(debug_context, CTX_FL_FORCE_MOVE))
|
762
|
+
debug_context->stop_next--;
|
763
|
+
if(debug_context->stop_next < 0)
|
764
|
+
debug_context->stop_next = -1;
|
765
|
+
if(moved || (CTX_FL_TEST(debug_context, CTX_FL_STEPPED) &&
|
766
|
+
!CTX_FL_TEST(debug_context, CTX_FL_FORCE_MOVE)))
|
767
|
+
{
|
768
|
+
debug_context->stop_line--;
|
769
|
+
CTX_FL_UNSET(debug_context, CTX_FL_STEPPED);
|
770
|
+
}
|
771
|
+
}
|
772
|
+
else if(debug_context->stack_size < debug_context->dest_frame)
|
773
|
+
{
|
774
|
+
debug_context->stop_next = 0;
|
775
|
+
}
|
776
|
+
|
777
|
+
if(debug_context->stop_next == 0 || debug_context->stop_line == 0 ||
|
778
|
+
(breakpoint = check_breakpoints_by_pos(debug_context, file, line)) != Qnil)
|
779
|
+
{
|
780
|
+
binding = self? create_binding(self) : Qnil;
|
781
|
+
save_top_binding(debug_context, binding);
|
782
|
+
|
783
|
+
debug_context->stop_reason = CTX_STOP_STEP;
|
784
|
+
|
785
|
+
/* check breakpoint expression */
|
786
|
+
if(breakpoint != Qnil)
|
787
|
+
{
|
788
|
+
if(!check_breakpoint_expression(breakpoint, binding))
|
789
|
+
break;
|
790
|
+
if(!check_breakpoint_hit_condition(breakpoint))
|
791
|
+
break;
|
792
|
+
if(breakpoint != debug_context->breakpoint)
|
793
|
+
{
|
794
|
+
debug_context->stop_reason = CTX_STOP_BREAKPOINT;
|
795
|
+
rb_funcall(context, idAtBreakpoint, 1, breakpoint);
|
796
|
+
}
|
797
|
+
else
|
798
|
+
debug_context->breakpoint = Qnil;
|
799
|
+
}
|
800
|
+
|
801
|
+
reset_stepping_stop_points(debug_context);
|
802
|
+
call_at_line(context, debug_context, rb_str_new2(file), INT2FIX(line));
|
803
|
+
}
|
804
|
+
break;
|
805
|
+
}
|
806
|
+
case RUBY_EVENT_CALL:
|
807
|
+
{
|
808
|
+
save_call_frame(event, self, file, line, mid, debug_context);
|
809
|
+
breakpoint = check_breakpoints_by_method(debug_context, klass, mid, self);
|
810
|
+
if(breakpoint != Qnil)
|
811
|
+
{
|
812
|
+
debug_frame_t *debug_frame;
|
813
|
+
debug_frame = get_top_frame(debug_context);
|
814
|
+
if(debug_frame)
|
815
|
+
binding = debug_frame->binding;
|
816
|
+
if(NIL_P(binding) && self)
|
817
|
+
binding = create_binding(self);
|
818
|
+
save_top_binding(debug_context, binding);
|
819
|
+
|
820
|
+
if(!check_breakpoint_expression(breakpoint, binding))
|
821
|
+
break;
|
822
|
+
if(!check_breakpoint_hit_condition(breakpoint))
|
823
|
+
break;
|
824
|
+
if(breakpoint != debug_context->breakpoint)
|
825
|
+
{
|
826
|
+
debug_context->stop_reason = CTX_STOP_BREAKPOINT;
|
827
|
+
rb_funcall(context, idAtBreakpoint, 1, breakpoint);
|
828
|
+
}
|
829
|
+
else
|
830
|
+
debug_context->breakpoint = Qnil;
|
831
|
+
call_at_line(context, debug_context, rb_str_new2(file), INT2FIX(line));
|
832
|
+
}
|
833
|
+
break;
|
834
|
+
}
|
835
|
+
case RUBY_EVENT_C_CALL:
|
836
|
+
{
|
837
|
+
if(c_call_new_frame_p(klass, mid))
|
838
|
+
save_call_frame(event, self, file, line, mid, debug_context);
|
839
|
+
else
|
840
|
+
set_frame_source(event, debug_context, self, file, line, mid);
|
841
|
+
break;
|
842
|
+
}
|
843
|
+
case RUBY_EVENT_C_RETURN:
|
844
|
+
{
|
845
|
+
/* note if a block is given we fall through! */
|
846
|
+
if(!node || !c_call_new_frame_p(klass, mid))
|
847
|
+
break;
|
848
|
+
}
|
849
|
+
case RUBY_EVENT_RETURN:
|
850
|
+
case RUBY_EVENT_END:
|
851
|
+
{
|
852
|
+
if(debug_context->stack_size == debug_context->stop_frame)
|
853
|
+
{
|
854
|
+
debug_context->stop_next = 1;
|
855
|
+
debug_context->stop_frame = 0;
|
856
|
+
/* NOTE: can't use call_at_line function here to trigger a debugger event.
|
857
|
+
this can lead to segfault. We should only unroll the stack on this event.
|
858
|
+
*/
|
859
|
+
}
|
860
|
+
while(debug_context->stack_size > 0)
|
861
|
+
{
|
862
|
+
debug_context->stack_size--;
|
863
|
+
if(debug_context->frames[debug_context->stack_size].orig_id == mid)
|
864
|
+
break;
|
865
|
+
}
|
866
|
+
CTX_FL_SET(debug_context, CTX_FL_ENABLE_BKPT);
|
867
|
+
break;
|
868
|
+
}
|
869
|
+
case RUBY_EVENT_CLASS:
|
870
|
+
{
|
871
|
+
reset_frame_mid(debug_context);
|
872
|
+
save_call_frame(event, self, file, line, mid, debug_context);
|
873
|
+
break;
|
874
|
+
}
|
875
|
+
case RUBY_EVENT_RAISE:
|
876
|
+
{
|
877
|
+
VALUE ancestors;
|
878
|
+
VALUE expn_class, aclass;
|
879
|
+
int i;
|
880
|
+
|
881
|
+
set_frame_source(event, debug_context, self, file, line, mid);
|
882
|
+
|
883
|
+
if(post_mortem == Qtrue && self)
|
884
|
+
{
|
885
|
+
binding = create_binding(self);
|
886
|
+
rb_ivar_set(ruby_errinfo, rb_intern("@__debug_file"), rb_str_new2(file));
|
887
|
+
rb_ivar_set(ruby_errinfo, rb_intern("@__debug_line"), INT2FIX(line));
|
888
|
+
rb_ivar_set(ruby_errinfo, rb_intern("@__debug_binding"), binding);
|
889
|
+
rb_ivar_set(ruby_errinfo, rb_intern("@__debug_context"), debug_context_dup(debug_context));
|
890
|
+
}
|
891
|
+
|
892
|
+
expn_class = rb_obj_class(ruby_errinfo);
|
893
|
+
|
894
|
+
/* This code goes back to the earliest days of ruby-debug. It
|
895
|
+
tends to disallow catching an exception via the
|
896
|
+
"catchpoint" command. To address this one possiblilty is to
|
897
|
+
move this after testing for catchponts. Kent however thinks
|
898
|
+
there may be a misfeature in Ruby's eval.c: the problem was
|
899
|
+
in the fact that Ruby doesn't reset exception flag on the
|
900
|
+
current thread before it calls a notification handler.
|
901
|
+
|
902
|
+
See also the #ifdef'd code below as well.
|
903
|
+
*/
|
904
|
+
#ifdef NORMAL_CODE
|
905
|
+
if( !NIL_P(rb_class_inherited_p(expn_class, rb_eSystemExit)) )
|
906
|
+
{
|
907
|
+
debug_stop(mDebugger);
|
908
|
+
break;
|
909
|
+
}
|
910
|
+
#endif
|
911
|
+
|
912
|
+
if (rdebug_catchpoints == Qnil ||
|
913
|
+
RHASH(rdebug_catchpoints)->tbl->num_entries == 0)
|
914
|
+
break;
|
915
|
+
|
916
|
+
ancestors = rb_mod_ancestors(expn_class);
|
917
|
+
for(i = 0; i < RARRAY(ancestors)->len; i++)
|
918
|
+
{
|
919
|
+
VALUE mod_name;
|
920
|
+
VALUE hit_count;
|
921
|
+
|
922
|
+
aclass = rb_ary_entry(ancestors, i);
|
923
|
+
mod_name = rb_mod_name(aclass);
|
924
|
+
hit_count = rb_hash_aref(rdebug_catchpoints, mod_name);
|
925
|
+
if(hit_count != Qnil)
|
926
|
+
{
|
927
|
+
/* On 64-bit systems with gcc and -O2 there seems to be
|
928
|
+
an optimization bug in running INT2FIX(FIX2INT...)..)
|
929
|
+
So we do this in two steps.
|
930
|
+
*/
|
931
|
+
int c_hit_count = FIX2INT(rb_hash_aref(rdebug_catchpoints,
|
932
|
+
mod_name)) + 1;
|
933
|
+
hit_count = INT2FIX(c_hit_count);
|
934
|
+
rb_hash_aset(rdebug_catchpoints, mod_name, hit_count);
|
935
|
+
debug_context->stop_reason = CTX_STOP_CATCHPOINT;
|
936
|
+
rb_funcall(context, idAtCatchpoint, 1, ruby_errinfo);
|
937
|
+
if(self && binding == Qnil)
|
938
|
+
binding = create_binding(self);
|
939
|
+
save_top_binding(debug_context, binding);
|
940
|
+
call_at_line(context, debug_context, rb_str_new2(file), INT2FIX(line));
|
941
|
+
break;
|
942
|
+
}
|
943
|
+
}
|
944
|
+
|
945
|
+
/* If we stop the debugger, we may not be able to trace into
|
946
|
+
code that has an exception handler wrapped around it. So
|
947
|
+
the alternative is to force the user to do his own
|
948
|
+
Debugger.stop. */
|
949
|
+
#ifdef NORMAL_CODE_MOVING_AFTER_
|
950
|
+
if( !NIL_P(rb_class_inherited_p(expn_class, rb_eSystemExit)) )
|
951
|
+
{
|
952
|
+
debug_stop(mDebugger);
|
953
|
+
break;
|
954
|
+
}
|
955
|
+
#endif
|
956
|
+
|
957
|
+
break;
|
958
|
+
}
|
959
|
+
}
|
960
|
+
|
961
|
+
cleanup:
|
962
|
+
|
963
|
+
debug_context->stop_reason = CTX_STOP_NONE;
|
964
|
+
|
965
|
+
/* check that all contexts point to alive threads */
|
966
|
+
if(hook_count - last_check > 3000)
|
967
|
+
{
|
968
|
+
check_thread_contexts();
|
969
|
+
last_check = hook_count;
|
970
|
+
}
|
971
|
+
|
972
|
+
/* release a lock */
|
973
|
+
locker = Qnil;
|
974
|
+
/* let the next thread to run */
|
975
|
+
thread = remove_from_locked();
|
976
|
+
if(thread != Qnil)
|
977
|
+
rb_thread_run(thread);
|
978
|
+
}
|
979
|
+
|
980
|
+
static VALUE
|
981
|
+
debug_stop_i(VALUE self)
|
982
|
+
{
|
983
|
+
if(IS_STARTED)
|
984
|
+
debug_stop(self);
|
985
|
+
return Qnil;
|
986
|
+
}
|
987
|
+
|
988
|
+
/*
|
989
|
+
* call-seq:
|
990
|
+
* Debugger.start_ -> bool
|
991
|
+
* Debugger.start_ { ... } -> bool
|
992
|
+
*
|
993
|
+
* This method is internal and activates the debugger. Use
|
994
|
+
* Debugger.start (from <tt>lib/ruby-debug-base.rb</tt>) instead.
|
995
|
+
*
|
996
|
+
* The return value is the value of !Debugger.started? <i>before</i>
|
997
|
+
* issuing the +start+; That is, +true+ is returned, unless debugger
|
998
|
+
* was previously started.
|
999
|
+
|
1000
|
+
* If a block is given, it starts debugger and yields to block. When
|
1001
|
+
* the block is finished executing it stops the debugger with
|
1002
|
+
* Debugger.stop method. Inside the block you will probably want to
|
1003
|
+
* have a call to Debugger.debugger. For example:
|
1004
|
+
* Debugger.start{debugger; foo} # Stop inside of foo
|
1005
|
+
*
|
1006
|
+
* Also, ruby-debug only allows
|
1007
|
+
* one invocation of debugger at a time; nested Debugger.start's
|
1008
|
+
* have no effect and you can't use this inside the debugger itself.
|
1009
|
+
*
|
1010
|
+
* <i>Note that if you want to completely remove the debugger hook,
|
1011
|
+
* you must call Debugger.stop as many times as you called
|
1012
|
+
* Debugger.start method.</i>
|
1013
|
+
*/
|
1014
|
+
static VALUE
|
1015
|
+
debug_start(VALUE self)
|
1016
|
+
{
|
1017
|
+
VALUE result;
|
1018
|
+
start_count++;
|
1019
|
+
|
1020
|
+
if(IS_STARTED)
|
1021
|
+
result = Qfalse;
|
1022
|
+
else
|
1023
|
+
{
|
1024
|
+
locker = Qnil;
|
1025
|
+
rdebug_breakpoints = rb_ary_new();
|
1026
|
+
rdebug_catchpoints = rb_hash_new();
|
1027
|
+
rdebug_threads_tbl = threads_table_create();
|
1028
|
+
|
1029
|
+
rb_add_event_hook(debug_event_hook, RUBY_EVENT_ALL);
|
1030
|
+
result = Qtrue;
|
1031
|
+
}
|
1032
|
+
|
1033
|
+
if(rb_block_given_p())
|
1034
|
+
rb_ensure(rb_yield, self, debug_stop_i, self);
|
1035
|
+
|
1036
|
+
return result;
|
1037
|
+
}
|
1038
|
+
|
1039
|
+
/*
|
1040
|
+
* call-seq:
|
1041
|
+
* Debugger.stop -> bool
|
1042
|
+
*
|
1043
|
+
* This method disables the debugger. It returns +true+ if the debugger is disabled,
|
1044
|
+
* otherwise it returns +false+.
|
1045
|
+
*
|
1046
|
+
* <i>Note that if you want to complete remove the debugger hook,
|
1047
|
+
* you must call Debugger.stop as many times as you called
|
1048
|
+
* Debugger.start method.</i>
|
1049
|
+
*/
|
1050
|
+
static VALUE
|
1051
|
+
debug_stop(VALUE self)
|
1052
|
+
{
|
1053
|
+
debug_check_started();
|
1054
|
+
|
1055
|
+
start_count--;
|
1056
|
+
if(start_count)
|
1057
|
+
return Qfalse;
|
1058
|
+
|
1059
|
+
rb_remove_event_hook(debug_event_hook);
|
1060
|
+
|
1061
|
+
locker = Qnil;
|
1062
|
+
rdebug_breakpoints = Qnil;
|
1063
|
+
rdebug_threads_tbl = Qnil;
|
1064
|
+
|
1065
|
+
return Qtrue;
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
static int
|
1069
|
+
find_last_context_func(VALUE key, VALUE value, VALUE *result)
|
1070
|
+
{
|
1071
|
+
debug_context_t *debug_context;
|
1072
|
+
Data_Get_Struct(value, debug_context_t, debug_context);
|
1073
|
+
if(debug_context->thnum == last_debugged_thnum)
|
1074
|
+
{
|
1075
|
+
*result = value;
|
1076
|
+
return ST_STOP;
|
1077
|
+
}
|
1078
|
+
return ST_CONTINUE;
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
/*
|
1082
|
+
* call-seq:
|
1083
|
+
* Debugger.last_interrupted -> context
|
1084
|
+
*
|
1085
|
+
* Returns last debugged context.
|
1086
|
+
*/
|
1087
|
+
static VALUE
|
1088
|
+
debug_last_interrupted(VALUE self)
|
1089
|
+
{
|
1090
|
+
VALUE result = Qnil;
|
1091
|
+
threads_table_t *threads_table;
|
1092
|
+
|
1093
|
+
debug_check_started();
|
1094
|
+
|
1095
|
+
Data_Get_Struct(rdebug_threads_tbl, threads_table_t, threads_table);
|
1096
|
+
|
1097
|
+
st_foreach(threads_table->tbl, find_last_context_func, (st_data_t)&result);
|
1098
|
+
return result;
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
/*
|
1102
|
+
* call-seq:
|
1103
|
+
* Debugger.current_context -> context
|
1104
|
+
*
|
1105
|
+
* Returns current context.
|
1106
|
+
* <i>Note:</i> Debugger.current_context.thread == Thread.current
|
1107
|
+
*/
|
1108
|
+
static VALUE
|
1109
|
+
debug_current_context(VALUE self)
|
1110
|
+
{
|
1111
|
+
VALUE thread, context;
|
1112
|
+
|
1113
|
+
debug_check_started();
|
1114
|
+
|
1115
|
+
thread = rb_thread_current();
|
1116
|
+
thread_context_lookup(thread, &context, NULL);
|
1117
|
+
|
1118
|
+
return context;
|
1119
|
+
}
|
1120
|
+
|
1121
|
+
/*
|
1122
|
+
* call-seq:
|
1123
|
+
* Debugger.thread_context(thread) -> context
|
1124
|
+
*
|
1125
|
+
* Returns context of the thread passed as an argument.
|
1126
|
+
*/
|
1127
|
+
static VALUE
|
1128
|
+
debug_thread_context(VALUE self, VALUE thread)
|
1129
|
+
{
|
1130
|
+
VALUE context;
|
1131
|
+
|
1132
|
+
debug_check_started();
|
1133
|
+
thread_context_lookup(thread, &context, NULL);
|
1134
|
+
return context;
|
1135
|
+
}
|
1136
|
+
|
1137
|
+
/*
|
1138
|
+
* call-seq:
|
1139
|
+
* Debugger.contexts -> array
|
1140
|
+
*
|
1141
|
+
* Returns an array of all contexts.
|
1142
|
+
*/
|
1143
|
+
static VALUE
|
1144
|
+
debug_contexts(VALUE self)
|
1145
|
+
{
|
1146
|
+
volatile VALUE list;
|
1147
|
+
volatile VALUE new_list;
|
1148
|
+
VALUE thread, context;
|
1149
|
+
threads_table_t *threads_table;
|
1150
|
+
debug_context_t *debug_context;
|
1151
|
+
int i;
|
1152
|
+
|
1153
|
+
debug_check_started();
|
1154
|
+
|
1155
|
+
new_list = rb_ary_new();
|
1156
|
+
list = rb_funcall(rb_cThread, idList, 0);
|
1157
|
+
for(i = 0; i < RARRAY(list)->len; i++)
|
1158
|
+
{
|
1159
|
+
thread = rb_ary_entry(list, i);
|
1160
|
+
thread_context_lookup(thread, &context, NULL);
|
1161
|
+
rb_ary_push(new_list, context);
|
1162
|
+
}
|
1163
|
+
threads_table_clear(rdebug_threads_tbl);
|
1164
|
+
Data_Get_Struct(rdebug_threads_tbl, threads_table_t, threads_table);
|
1165
|
+
for(i = 0; i < RARRAY(new_list)->len; i++)
|
1166
|
+
{
|
1167
|
+
context = rb_ary_entry(new_list, i);
|
1168
|
+
Data_Get_Struct(context, debug_context_t, debug_context);
|
1169
|
+
st_insert(threads_table->tbl, debug_context->thread_id, context);
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
return new_list;
|
1173
|
+
}
|
1174
|
+
|
1175
|
+
/*
|
1176
|
+
* call-seq:
|
1177
|
+
* Debugger.suspend -> Debugger
|
1178
|
+
*
|
1179
|
+
* Suspends all contexts.
|
1180
|
+
*/
|
1181
|
+
static VALUE
|
1182
|
+
debug_suspend(VALUE self)
|
1183
|
+
{
|
1184
|
+
VALUE current, context;
|
1185
|
+
VALUE saved_crit;
|
1186
|
+
VALUE context_list;
|
1187
|
+
debug_context_t *debug_context;
|
1188
|
+
int i;
|
1189
|
+
|
1190
|
+
debug_check_started();
|
1191
|
+
|
1192
|
+
saved_crit = rb_thread_critical;
|
1193
|
+
rb_thread_critical = Qtrue;
|
1194
|
+
context_list = debug_contexts(self);
|
1195
|
+
thread_context_lookup(rb_thread_current(), ¤t, NULL);
|
1196
|
+
|
1197
|
+
for(i = 0; i < RARRAY(context_list)->len; i++)
|
1198
|
+
{
|
1199
|
+
context = rb_ary_entry(context_list, i);
|
1200
|
+
if(current == context)
|
1201
|
+
continue;
|
1202
|
+
Data_Get_Struct(context, debug_context_t, debug_context);
|
1203
|
+
context_suspend_0(debug_context);
|
1204
|
+
}
|
1205
|
+
rb_thread_critical = saved_crit;
|
1206
|
+
|
1207
|
+
if(rb_thread_critical == Qfalse)
|
1208
|
+
rb_thread_schedule();
|
1209
|
+
|
1210
|
+
return self;
|
1211
|
+
}
|
1212
|
+
|
1213
|
+
/*
|
1214
|
+
* call-seq:
|
1215
|
+
* Debugger.resume -> Debugger
|
1216
|
+
*
|
1217
|
+
* Resumes all contexts.
|
1218
|
+
*/
|
1219
|
+
static VALUE
|
1220
|
+
debug_resume(VALUE self)
|
1221
|
+
{
|
1222
|
+
VALUE current, context;
|
1223
|
+
VALUE saved_crit;
|
1224
|
+
VALUE context_list;
|
1225
|
+
debug_context_t *debug_context;
|
1226
|
+
int i;
|
1227
|
+
|
1228
|
+
debug_check_started();
|
1229
|
+
|
1230
|
+
saved_crit = rb_thread_critical;
|
1231
|
+
rb_thread_critical = Qtrue;
|
1232
|
+
context_list = debug_contexts(self);
|
1233
|
+
|
1234
|
+
thread_context_lookup(rb_thread_current(), ¤t, NULL);
|
1235
|
+
for(i = 0; i < RARRAY(context_list)->len; i++)
|
1236
|
+
{
|
1237
|
+
context = rb_ary_entry(context_list, i);
|
1238
|
+
if(current == context)
|
1239
|
+
continue;
|
1240
|
+
Data_Get_Struct(context, debug_context_t, debug_context);
|
1241
|
+
context_resume_0(debug_context);
|
1242
|
+
}
|
1243
|
+
rb_thread_critical = saved_crit;
|
1244
|
+
|
1245
|
+
rb_thread_schedule();
|
1246
|
+
|
1247
|
+
return self;
|
1248
|
+
}
|
1249
|
+
|
1250
|
+
/*
|
1251
|
+
* call-seq:
|
1252
|
+
* Debugger.tracing -> bool
|
1253
|
+
*
|
1254
|
+
* Returns +true+ if the global tracing is activated.
|
1255
|
+
*/
|
1256
|
+
static VALUE
|
1257
|
+
debug_tracing(VALUE self)
|
1258
|
+
{
|
1259
|
+
return tracing;
|
1260
|
+
}
|
1261
|
+
|
1262
|
+
/*
|
1263
|
+
* call-seq:
|
1264
|
+
* Debugger.tracing = bool
|
1265
|
+
*
|
1266
|
+
* Sets the global tracing flag.
|
1267
|
+
*/
|
1268
|
+
static VALUE
|
1269
|
+
debug_set_tracing(VALUE self, VALUE value)
|
1270
|
+
{
|
1271
|
+
tracing = RTEST(value) ? Qtrue : Qfalse;
|
1272
|
+
return value;
|
1273
|
+
}
|
1274
|
+
|
1275
|
+
/*
|
1276
|
+
* call-seq:
|
1277
|
+
* Debugger.post_mortem? -> bool
|
1278
|
+
*
|
1279
|
+
* Returns +true+ if post-moterm debugging is enabled.
|
1280
|
+
*/
|
1281
|
+
static VALUE
|
1282
|
+
debug_post_mortem(VALUE self)
|
1283
|
+
{
|
1284
|
+
return post_mortem;
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
/*
|
1288
|
+
* call-seq:
|
1289
|
+
* Debugger.post_mortem = bool
|
1290
|
+
*
|
1291
|
+
* Sets post-moterm flag.
|
1292
|
+
* FOR INTERNAL USE ONLY.
|
1293
|
+
*/
|
1294
|
+
static VALUE
|
1295
|
+
debug_set_post_mortem(VALUE self, VALUE value)
|
1296
|
+
{
|
1297
|
+
debug_check_started();
|
1298
|
+
|
1299
|
+
post_mortem = RTEST(value) ? Qtrue : Qfalse;
|
1300
|
+
return value;
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
/*
|
1304
|
+
* call-seq:
|
1305
|
+
* Debugger.track_fame_args? -> bool
|
1306
|
+
*
|
1307
|
+
* Returns +true+ if the debugger track frame argument values on calls.
|
1308
|
+
*/
|
1309
|
+
static VALUE
|
1310
|
+
debug_track_frame_args(VALUE self)
|
1311
|
+
{
|
1312
|
+
return track_frame_args;
|
1313
|
+
}
|
1314
|
+
|
1315
|
+
/*
|
1316
|
+
* call-seq:
|
1317
|
+
* Debugger.track_frame_args = bool
|
1318
|
+
*
|
1319
|
+
* Setting to +true+ will make the debugger save argument info on calls.
|
1320
|
+
*/
|
1321
|
+
static VALUE
|
1322
|
+
debug_set_track_frame_args(VALUE self, VALUE value)
|
1323
|
+
{
|
1324
|
+
track_frame_args = RTEST(value) ? Qtrue : Qfalse;
|
1325
|
+
return value;
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
/*
|
1329
|
+
* call-seq:
|
1330
|
+
* Debugger.keep_frame_binding? -> bool
|
1331
|
+
*
|
1332
|
+
* Returns +true+ if the debugger will collect frame bindings.
|
1333
|
+
*/
|
1334
|
+
static VALUE
|
1335
|
+
debug_keep_frame_binding(VALUE self)
|
1336
|
+
{
|
1337
|
+
return keep_frame_binding;
|
1338
|
+
}
|
1339
|
+
|
1340
|
+
/*
|
1341
|
+
* call-seq:
|
1342
|
+
* Debugger.keep_frame_binding = bool
|
1343
|
+
*
|
1344
|
+
* Setting to +true+ will make the debugger create frame bindings.
|
1345
|
+
*/
|
1346
|
+
static VALUE
|
1347
|
+
debug_set_keep_frame_binding(VALUE self, VALUE value)
|
1348
|
+
{
|
1349
|
+
keep_frame_binding = RTEST(value) ? Qtrue : Qfalse;
|
1350
|
+
return value;
|
1351
|
+
}
|
1352
|
+
|
1353
|
+
/* :nodoc: */
|
1354
|
+
static VALUE
|
1355
|
+
debug_debug(VALUE self)
|
1356
|
+
{
|
1357
|
+
return debug;
|
1358
|
+
}
|
1359
|
+
|
1360
|
+
/* :nodoc: */
|
1361
|
+
static VALUE
|
1362
|
+
debug_set_debug(VALUE self, VALUE value)
|
1363
|
+
{
|
1364
|
+
debug = RTEST(value) ? Qtrue : Qfalse;
|
1365
|
+
return value;
|
1366
|
+
}
|
1367
|
+
|
1368
|
+
/* :nodoc: */
|
1369
|
+
static VALUE
|
1370
|
+
debug_thread_inherited(VALUE klass)
|
1371
|
+
{
|
1372
|
+
rb_raise(rb_eRuntimeError, "Can't inherite Debugger::DebugThread class");
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
/*
|
1376
|
+
* call-seq:
|
1377
|
+
* Debugger.debug_load(file, stop = false, increment_start = false) -> nil
|
1378
|
+
*
|
1379
|
+
* Same as Kernel#load but resets current context's frames.
|
1380
|
+
* +stop+ parameter forces the debugger to stop at the first line of code in the +file+
|
1381
|
+
* +increment_start+ determines if start_count should be incremented. When
|
1382
|
+
* control threads are used, they have to be set up before loading the
|
1383
|
+
* debugger; so here +increment_start+ will be false.
|
1384
|
+
* FOR INTERNAL USE ONLY.
|
1385
|
+
*/
|
1386
|
+
static VALUE
|
1387
|
+
debug_debug_load(int argc, VALUE *argv, VALUE self)
|
1388
|
+
{
|
1389
|
+
VALUE file, stop, context, increment_start;
|
1390
|
+
debug_context_t *debug_context;
|
1391
|
+
int state = 0;
|
1392
|
+
|
1393
|
+
if(rb_scan_args(argc, argv, "12", &file, &stop, &increment_start) == 1)
|
1394
|
+
{
|
1395
|
+
stop = Qfalse;
|
1396
|
+
increment_start = Qtrue;
|
1397
|
+
}
|
1398
|
+
|
1399
|
+
debug_start(self);
|
1400
|
+
if (Qfalse == increment_start) start_count--;
|
1401
|
+
|
1402
|
+
context = debug_current_context(self);
|
1403
|
+
Data_Get_Struct(context, debug_context_t, debug_context);
|
1404
|
+
debug_context->stack_size = 0;
|
1405
|
+
if(RTEST(stop))
|
1406
|
+
debug_context->stop_next = 1;
|
1407
|
+
/* Initializing $0 to the script's path */
|
1408
|
+
ruby_script(RSTRING(file)->ptr);
|
1409
|
+
rb_load_protect(file, 0, &state);
|
1410
|
+
if (0 != state) {
|
1411
|
+
VALUE errinfo = ruby_errinfo;
|
1412
|
+
debug_suspend(self);
|
1413
|
+
reset_stepping_stop_points(debug_context);
|
1414
|
+
ruby_errinfo = Qnil;
|
1415
|
+
return errinfo;
|
1416
|
+
}
|
1417
|
+
|
1418
|
+
/* We should run all at_exit handler's in order to provide,
|
1419
|
+
* for instance, a chance to run all defined test cases */
|
1420
|
+
rb_exec_end_proc();
|
1421
|
+
|
1422
|
+
/* We could have issued a Debugger.stop inside the debug
|
1423
|
+
session. */
|
1424
|
+
if (start_count > 0) {
|
1425
|
+
debug_stop(self);
|
1426
|
+
}
|
1427
|
+
|
1428
|
+
return Qnil;
|
1429
|
+
}
|
1430
|
+
|
1431
|
+
static VALUE
|
1432
|
+
set_current_skipped_status(VALUE status)
|
1433
|
+
{
|
1434
|
+
VALUE context;
|
1435
|
+
debug_context_t *debug_context;
|
1436
|
+
|
1437
|
+
context = debug_current_context(Qnil);
|
1438
|
+
Data_Get_Struct(context, debug_context_t, debug_context);
|
1439
|
+
if(status)
|
1440
|
+
CTX_FL_SET(debug_context, CTX_FL_SKIPPED);
|
1441
|
+
else
|
1442
|
+
CTX_FL_UNSET(debug_context, CTX_FL_SKIPPED);
|
1443
|
+
return Qnil;
|
1444
|
+
}
|
1445
|
+
|
1446
|
+
/*
|
1447
|
+
* call-seq:
|
1448
|
+
* Debugger.skip { block } -> obj or nil
|
1449
|
+
*
|
1450
|
+
* The code inside of the block is escaped from the debugger.
|
1451
|
+
*/
|
1452
|
+
static VALUE
|
1453
|
+
debug_skip(VALUE self)
|
1454
|
+
{
|
1455
|
+
if (!rb_block_given_p()) {
|
1456
|
+
rb_raise(rb_eArgError, "called without a block");
|
1457
|
+
}
|
1458
|
+
if(!IS_STARTED)
|
1459
|
+
return rb_yield(Qnil);
|
1460
|
+
set_current_skipped_status(Qtrue);
|
1461
|
+
return rb_ensure(rb_yield, Qnil, set_current_skipped_status, Qfalse);
|
1462
|
+
}
|
1463
|
+
|
1464
|
+
static VALUE
|
1465
|
+
debug_at_exit_c(VALUE proc)
|
1466
|
+
{
|
1467
|
+
return rb_funcall(proc, rb_intern("call"), 0);
|
1468
|
+
}
|
1469
|
+
|
1470
|
+
static void
|
1471
|
+
debug_at_exit_i(VALUE proc)
|
1472
|
+
{
|
1473
|
+
if(!IS_STARTED)
|
1474
|
+
{
|
1475
|
+
debug_at_exit_c(proc);
|
1476
|
+
}
|
1477
|
+
else
|
1478
|
+
{
|
1479
|
+
set_current_skipped_status(Qtrue);
|
1480
|
+
rb_ensure(debug_at_exit_c, proc, set_current_skipped_status, Qfalse);
|
1481
|
+
}
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
/*
|
1485
|
+
* call-seq:
|
1486
|
+
* Debugger.debug_at_exit { block } -> proc
|
1487
|
+
*
|
1488
|
+
* Register <tt>at_exit</tt> hook which is escaped from the debugger.
|
1489
|
+
* FOR INTERNAL USE ONLY.
|
1490
|
+
*/
|
1491
|
+
static VALUE
|
1492
|
+
debug_at_exit(VALUE self)
|
1493
|
+
{
|
1494
|
+
VALUE proc;
|
1495
|
+
if (!rb_block_given_p())
|
1496
|
+
rb_raise(rb_eArgError, "called without a block");
|
1497
|
+
proc = rb_block_proc();
|
1498
|
+
rb_set_end_proc(debug_at_exit_i, proc);
|
1499
|
+
return proc;
|
1500
|
+
}
|
1501
|
+
|
1502
|
+
/*
|
1503
|
+
* call-seq:
|
1504
|
+
* context.step(steps, force = false)
|
1505
|
+
*
|
1506
|
+
* Stops the current context after a number of +steps+ are made.
|
1507
|
+
* +force+ parameter (if true) ensures that the cursor moves from the current line.
|
1508
|
+
*/
|
1509
|
+
static VALUE
|
1510
|
+
context_stop_next(int argc, VALUE *argv, VALUE self)
|
1511
|
+
{
|
1512
|
+
VALUE steps, force;
|
1513
|
+
debug_context_t *debug_context;
|
1514
|
+
|
1515
|
+
debug_check_started();
|
1516
|
+
|
1517
|
+
rb_scan_args(argc, argv, "11", &steps, &force);
|
1518
|
+
if(FIX2INT(steps) < 0)
|
1519
|
+
rb_raise(rb_eRuntimeError, "Steps argument can't be negative.");
|
1520
|
+
|
1521
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1522
|
+
debug_context->stop_next = FIX2INT(steps);
|
1523
|
+
if(RTEST(force))
|
1524
|
+
CTX_FL_SET(debug_context, CTX_FL_FORCE_MOVE);
|
1525
|
+
else
|
1526
|
+
CTX_FL_UNSET(debug_context, CTX_FL_FORCE_MOVE);
|
1527
|
+
|
1528
|
+
return steps;
|
1529
|
+
}
|
1530
|
+
|
1531
|
+
/*
|
1532
|
+
* call-seq:
|
1533
|
+
* context.step_over(steps, frame = nil, force = false)
|
1534
|
+
*
|
1535
|
+
* Steps over a +steps+ number of times.
|
1536
|
+
* Make step over operation on +frame+, by default the current frame.
|
1537
|
+
* +force+ parameter (if true) ensures that the cursor moves from the current line.
|
1538
|
+
*/
|
1539
|
+
static VALUE
|
1540
|
+
context_step_over(int argc, VALUE *argv, VALUE self)
|
1541
|
+
{
|
1542
|
+
VALUE lines, frame, force;
|
1543
|
+
debug_context_t *debug_context;
|
1544
|
+
|
1545
|
+
debug_check_started();
|
1546
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1547
|
+
if(debug_context->stack_size == 0)
|
1548
|
+
rb_raise(rb_eRuntimeError, "No frames collected.");
|
1549
|
+
|
1550
|
+
rb_scan_args(argc, argv, "12", &lines, &frame, &force);
|
1551
|
+
debug_context->stop_line = FIX2INT(lines);
|
1552
|
+
CTX_FL_UNSET(debug_context, CTX_FL_STEPPED);
|
1553
|
+
if(frame == Qnil)
|
1554
|
+
{
|
1555
|
+
debug_context->dest_frame = debug_context->stack_size;
|
1556
|
+
}
|
1557
|
+
else
|
1558
|
+
{
|
1559
|
+
if(FIX2INT(frame) < 0 && FIX2INT(frame) >= debug_context->stack_size)
|
1560
|
+
rb_raise(rb_eRuntimeError, "Destination frame is out of range.");
|
1561
|
+
debug_context->dest_frame = debug_context->stack_size - FIX2INT(frame);
|
1562
|
+
}
|
1563
|
+
if(RTEST(force))
|
1564
|
+
CTX_FL_SET(debug_context, CTX_FL_FORCE_MOVE);
|
1565
|
+
else
|
1566
|
+
CTX_FL_UNSET(debug_context, CTX_FL_FORCE_MOVE);
|
1567
|
+
|
1568
|
+
return Qnil;
|
1569
|
+
}
|
1570
|
+
|
1571
|
+
/*
|
1572
|
+
* call-seq:
|
1573
|
+
* context.stop_frame(frame)
|
1574
|
+
*
|
1575
|
+
* Stops when a frame with number +frame+ is activated. Implements +finish+ and +next+ commands.
|
1576
|
+
*/
|
1577
|
+
static VALUE
|
1578
|
+
context_stop_frame(VALUE self, VALUE frame)
|
1579
|
+
{
|
1580
|
+
debug_context_t *debug_context;
|
1581
|
+
|
1582
|
+
debug_check_started();
|
1583
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1584
|
+
if(FIX2INT(frame) < 0 && FIX2INT(frame) >= debug_context->stack_size)
|
1585
|
+
rb_raise(rb_eRuntimeError, "Stop frame is out of range.");
|
1586
|
+
debug_context->stop_frame = debug_context->stack_size - FIX2INT(frame);
|
1587
|
+
|
1588
|
+
return frame;
|
1589
|
+
}
|
1590
|
+
|
1591
|
+
inline static int
|
1592
|
+
check_frame_number(debug_context_t *debug_context, VALUE frame)
|
1593
|
+
{
|
1594
|
+
int frame_n;
|
1595
|
+
|
1596
|
+
frame_n = FIX2INT(frame);
|
1597
|
+
if(frame_n < 0 || frame_n >= debug_context->stack_size)
|
1598
|
+
rb_raise(rb_eArgError, "Invalid frame number %d, stack (0...%d)",
|
1599
|
+
frame_n, debug_context->stack_size);
|
1600
|
+
return frame_n;
|
1601
|
+
}
|
1602
|
+
|
1603
|
+
static int
|
1604
|
+
optional_frame_position(int argc, VALUE *argv) {
|
1605
|
+
unsigned int i_scanned;
|
1606
|
+
VALUE level;
|
1607
|
+
|
1608
|
+
if ((argc > 1) || (argc < 0))
|
1609
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 or 1)", argc);
|
1610
|
+
i_scanned = rb_scan_args(argc, argv, "01", &level);
|
1611
|
+
if (0 == i_scanned) {
|
1612
|
+
level = INT2FIX(0);
|
1613
|
+
}
|
1614
|
+
return level;
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
/*
|
1618
|
+
* call-seq:
|
1619
|
+
* context.frame_args_info(frame_position=0) -> list
|
1620
|
+
if track_frame_args or nil otherwise
|
1621
|
+
*
|
1622
|
+
* Returns info saved about call arguments (if any saved).
|
1623
|
+
*/
|
1624
|
+
static VALUE
|
1625
|
+
context_frame_args_info(int argc, VALUE *argv, VALUE self)
|
1626
|
+
{
|
1627
|
+
VALUE frame;
|
1628
|
+
debug_context_t *debug_context;
|
1629
|
+
|
1630
|
+
debug_check_started();
|
1631
|
+
frame = optional_frame_position(argc, argv);
|
1632
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1633
|
+
|
1634
|
+
return RTEST(track_frame_args) ? GET_FRAME->arg_ary : Qnil;
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
/*
|
1638
|
+
* call-seq:
|
1639
|
+
* context.frame_binding(frame_position=0) -> binding
|
1640
|
+
*
|
1641
|
+
* Returns frame's binding.
|
1642
|
+
*/
|
1643
|
+
static VALUE
|
1644
|
+
context_frame_binding(int argc, VALUE *argv, VALUE self)
|
1645
|
+
{
|
1646
|
+
VALUE frame;
|
1647
|
+
debug_context_t *debug_context;
|
1648
|
+
|
1649
|
+
debug_check_started();
|
1650
|
+
frame = optional_frame_position(argc, argv);
|
1651
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1652
|
+
return GET_FRAME->binding;
|
1653
|
+
}
|
1654
|
+
|
1655
|
+
/*
|
1656
|
+
* call-seq:
|
1657
|
+
* context.frame_method(frame_position=0) -> sym
|
1658
|
+
*
|
1659
|
+
* Returns the sym of the called method.
|
1660
|
+
*/
|
1661
|
+
static VALUE
|
1662
|
+
context_frame_id(int argc, VALUE *argv, VALUE self)
|
1663
|
+
{
|
1664
|
+
VALUE frame;
|
1665
|
+
debug_context_t *debug_context;
|
1666
|
+
ID id;
|
1667
|
+
|
1668
|
+
debug_check_started();
|
1669
|
+
frame = optional_frame_position(argc, argv);
|
1670
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1671
|
+
|
1672
|
+
id = GET_FRAME->id;
|
1673
|
+
return id ? ID2SYM(id): Qnil;
|
1674
|
+
}
|
1675
|
+
|
1676
|
+
/*
|
1677
|
+
* call-seq:
|
1678
|
+
* context.frame_line(frame_position) -> int
|
1679
|
+
*
|
1680
|
+
* Returns the line number in the file.
|
1681
|
+
*/
|
1682
|
+
static VALUE
|
1683
|
+
context_frame_line(int argc, VALUE *argv, VALUE self)
|
1684
|
+
{
|
1685
|
+
VALUE frame;
|
1686
|
+
debug_context_t *debug_context;
|
1687
|
+
|
1688
|
+
debug_check_started();
|
1689
|
+
frame = optional_frame_position(argc, argv);
|
1690
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1691
|
+
|
1692
|
+
return INT2FIX(GET_FRAME->line);
|
1693
|
+
}
|
1694
|
+
|
1695
|
+
/*
|
1696
|
+
* call-seq:
|
1697
|
+
* context.frame_file(frame_position) -> string
|
1698
|
+
*
|
1699
|
+
* Returns the name of the file.
|
1700
|
+
*/
|
1701
|
+
static VALUE
|
1702
|
+
context_frame_file(int argc, VALUE *argv, VALUE self)
|
1703
|
+
{
|
1704
|
+
VALUE frame;
|
1705
|
+
debug_context_t *debug_context;
|
1706
|
+
|
1707
|
+
debug_check_started();
|
1708
|
+
frame = optional_frame_position(argc, argv);
|
1709
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1710
|
+
|
1711
|
+
return rb_str_new2(GET_FRAME->file);
|
1712
|
+
}
|
1713
|
+
|
1714
|
+
static int
|
1715
|
+
arg_value_is_small(VALUE val)
|
1716
|
+
{
|
1717
|
+
switch (TYPE(val)) {
|
1718
|
+
case T_FIXNUM: case T_FLOAT: case T_CLASS:
|
1719
|
+
case T_NIL: case T_MODULE: case T_FILE:
|
1720
|
+
case T_TRUE: case T_FALSE: case T_UNDEF:
|
1721
|
+
return 1;
|
1722
|
+
default:
|
1723
|
+
return SYMBOL_P(val);
|
1724
|
+
}
|
1725
|
+
}
|
1726
|
+
|
1727
|
+
/*
|
1728
|
+
* Save scalar arguments or a class name.
|
1729
|
+
*/
|
1730
|
+
static void
|
1731
|
+
copy_scalar_args(debug_frame_t *debug_frame)
|
1732
|
+
{
|
1733
|
+
unsigned int i;
|
1734
|
+
ID *tbl = ruby_scope->local_tbl;;
|
1735
|
+
if (tbl && ruby_scope->local_vars)
|
1736
|
+
{
|
1737
|
+
int n = *tbl++;
|
1738
|
+
if (debug_frame->argc+2 < n) n = debug_frame->argc+2;
|
1739
|
+
debug_frame->arg_ary = rb_ary_new2(n);
|
1740
|
+
for (i=2; i<n; i++)
|
1741
|
+
{
|
1742
|
+
/* skip flip states */
|
1743
|
+
if (rb_is_local_id(tbl[i]))
|
1744
|
+
{
|
1745
|
+
const char *name = rb_id2name(tbl[i]);
|
1746
|
+
VALUE val = rb_eval_string (name);
|
1747
|
+
if (arg_value_is_small(val))
|
1748
|
+
rb_ary_push(debug_frame->arg_ary, val);
|
1749
|
+
else
|
1750
|
+
rb_ary_push(debug_frame->arg_ary,
|
1751
|
+
rb_str_new2(rb_obj_classname(val)));
|
1752
|
+
}
|
1753
|
+
}
|
1754
|
+
}
|
1755
|
+
}
|
1756
|
+
|
1757
|
+
|
1758
|
+
/*
|
1759
|
+
* call-seq:
|
1760
|
+
* context.copy_args(frame) -> list of args
|
1761
|
+
*
|
1762
|
+
* Returns a array of argument names.
|
1763
|
+
*/
|
1764
|
+
static VALUE
|
1765
|
+
context_copy_args(debug_frame_t *debug_frame)
|
1766
|
+
{
|
1767
|
+
ID *tbl;
|
1768
|
+
int n, i;
|
1769
|
+
struct SCOPE *scope;
|
1770
|
+
VALUE list = rb_ary_new2(0); /* [] */
|
1771
|
+
|
1772
|
+
scope = debug_frame->info.runtime.scope;
|
1773
|
+
tbl = scope->local_tbl;
|
1774
|
+
|
1775
|
+
if (tbl && scope->local_vars)
|
1776
|
+
{
|
1777
|
+
n = *tbl++;
|
1778
|
+
if (debug_frame->argc+2 < n) n = debug_frame->argc+2;
|
1779
|
+
list = rb_ary_new2(n);
|
1780
|
+
/* skip first 2 ($_ and $~) */
|
1781
|
+
for (i=2; i<n; i++)
|
1782
|
+
{
|
1783
|
+
/* skip first 2 ($_ and $~) */
|
1784
|
+
if (!rb_is_local_id(tbl[i])) continue; /* skip flip states */
|
1785
|
+
rb_ary_push(list, rb_str_new2(rb_id2name(tbl[i])));
|
1786
|
+
}
|
1787
|
+
}
|
1788
|
+
|
1789
|
+
return list;
|
1790
|
+
}
|
1791
|
+
static VALUE
|
1792
|
+
context_copy_locals(debug_frame_t *debug_frame)
|
1793
|
+
{
|
1794
|
+
ID *tbl;
|
1795
|
+
int n, i;
|
1796
|
+
struct SCOPE *scope;
|
1797
|
+
struct RVarmap *vars;
|
1798
|
+
VALUE hash = rb_hash_new();
|
1799
|
+
|
1800
|
+
scope = debug_frame->info.runtime.scope;
|
1801
|
+
tbl = scope->local_tbl;
|
1802
|
+
|
1803
|
+
if (tbl && scope->local_vars)
|
1804
|
+
{
|
1805
|
+
n = *tbl++;
|
1806
|
+
for (i=2; i<n; i++)
|
1807
|
+
{ /* skip first 2 ($_ and $~) */
|
1808
|
+
if (!rb_is_local_id(tbl[i])) continue; /* skip flip states */
|
1809
|
+
rb_hash_aset(hash, rb_str_new2(rb_id2name(tbl[i])), scope->local_vars[i]);
|
1810
|
+
}
|
1811
|
+
}
|
1812
|
+
|
1813
|
+
vars = debug_frame->info.runtime.dyna_vars;
|
1814
|
+
while (vars)
|
1815
|
+
{
|
1816
|
+
if (vars->id && rb_is_local_id(vars->id))
|
1817
|
+
{ /* skip $_, $~ and flip states */
|
1818
|
+
rb_hash_aset(hash, rb_str_new2(rb_id2name(vars->id)), vars->val);
|
1819
|
+
}
|
1820
|
+
vars = vars->next;
|
1821
|
+
}
|
1822
|
+
return hash;
|
1823
|
+
}
|
1824
|
+
|
1825
|
+
/*
|
1826
|
+
* call-seq:
|
1827
|
+
* context.frame_locals(frame) -> hash
|
1828
|
+
*
|
1829
|
+
* Returns frame's local variables.
|
1830
|
+
*/
|
1831
|
+
static VALUE
|
1832
|
+
context_frame_locals(int argc, VALUE *argv, VALUE self)
|
1833
|
+
{
|
1834
|
+
VALUE frame;
|
1835
|
+
debug_context_t *debug_context;
|
1836
|
+
debug_frame_t *debug_frame;
|
1837
|
+
|
1838
|
+
debug_check_started();
|
1839
|
+
frame = optional_frame_position(argc, argv);
|
1840
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1841
|
+
|
1842
|
+
debug_frame = GET_FRAME;
|
1843
|
+
if(debug_frame->dead)
|
1844
|
+
return debug_frame->info.copy.locals;
|
1845
|
+
else
|
1846
|
+
return context_copy_locals(debug_frame);
|
1847
|
+
}
|
1848
|
+
|
1849
|
+
/*
|
1850
|
+
* call-seq:
|
1851
|
+
* context.frame_args(frame_position=0) -> list
|
1852
|
+
*
|
1853
|
+
* Returns frame's argument parameters
|
1854
|
+
*/
|
1855
|
+
static VALUE
|
1856
|
+
context_frame_args(int argc, VALUE *argv, VALUE self)
|
1857
|
+
{
|
1858
|
+
VALUE frame;
|
1859
|
+
debug_context_t *debug_context;
|
1860
|
+
debug_frame_t *debug_frame;
|
1861
|
+
|
1862
|
+
debug_check_started();
|
1863
|
+
frame = optional_frame_position(argc, argv);
|
1864
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1865
|
+
|
1866
|
+
debug_frame = GET_FRAME;
|
1867
|
+
if(debug_frame->dead)
|
1868
|
+
return debug_frame->info.copy.args;
|
1869
|
+
else
|
1870
|
+
return context_copy_args(debug_frame);
|
1871
|
+
}
|
1872
|
+
|
1873
|
+
/*
|
1874
|
+
* call-seq:
|
1875
|
+
* context.frame_self(frame_postion=0) -> obj
|
1876
|
+
*
|
1877
|
+
* Returns self object of the frame.
|
1878
|
+
*/
|
1879
|
+
static VALUE
|
1880
|
+
context_frame_self(int argc, VALUE *argv, VALUE self)
|
1881
|
+
{
|
1882
|
+
VALUE frame;
|
1883
|
+
debug_context_t *debug_context;
|
1884
|
+
debug_frame_t *debug_frame;
|
1885
|
+
|
1886
|
+
debug_check_started();
|
1887
|
+
frame = optional_frame_position(argc, argv);
|
1888
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1889
|
+
|
1890
|
+
debug_frame = GET_FRAME;
|
1891
|
+
return debug_frame->self;
|
1892
|
+
}
|
1893
|
+
|
1894
|
+
/*
|
1895
|
+
* call-seq:
|
1896
|
+
* context.frame_class(frame_position) -> obj
|
1897
|
+
*
|
1898
|
+
* Returns the real class of the frame.
|
1899
|
+
* It could be different than context.frame_self(frame).class
|
1900
|
+
*/
|
1901
|
+
static VALUE
|
1902
|
+
context_frame_class(int argc, VALUE *argv, VALUE self)
|
1903
|
+
{
|
1904
|
+
VALUE frame;
|
1905
|
+
debug_context_t *debug_context;
|
1906
|
+
debug_frame_t *debug_frame;
|
1907
|
+
VALUE klass;
|
1908
|
+
|
1909
|
+
debug_check_started();
|
1910
|
+
frame = optional_frame_position(argc, argv);
|
1911
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1912
|
+
|
1913
|
+
debug_frame = GET_FRAME;
|
1914
|
+
|
1915
|
+
if(CTX_FL_TEST(debug_context, CTX_FL_DEAD))
|
1916
|
+
return Qnil;
|
1917
|
+
|
1918
|
+
#if RUBY_VERSION_CODE >= 190
|
1919
|
+
klass = debug_frame->info.runtime.frame->this_class;
|
1920
|
+
#else
|
1921
|
+
klass = debug_frame->info.runtime.frame->last_class;
|
1922
|
+
#endif
|
1923
|
+
|
1924
|
+
klass = real_class(klass);
|
1925
|
+
if(TYPE(klass) == T_CLASS || TYPE(klass) == T_MODULE)
|
1926
|
+
return klass;
|
1927
|
+
return Qnil;
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
|
1931
|
+
/*
|
1932
|
+
* call-seq:
|
1933
|
+
* context.stack_size-> int
|
1934
|
+
*
|
1935
|
+
* Returns the size of the context stack.
|
1936
|
+
*/
|
1937
|
+
static VALUE
|
1938
|
+
context_stack_size(VALUE self)
|
1939
|
+
{
|
1940
|
+
debug_context_t *debug_context;
|
1941
|
+
|
1942
|
+
debug_check_started();
|
1943
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1944
|
+
|
1945
|
+
return INT2FIX(debug_context->stack_size);
|
1946
|
+
}
|
1947
|
+
|
1948
|
+
/*
|
1949
|
+
* call-seq:
|
1950
|
+
* context.thread -> thread
|
1951
|
+
*
|
1952
|
+
* Returns a thread this context is associated with.
|
1953
|
+
*/
|
1954
|
+
static VALUE
|
1955
|
+
context_thread(VALUE self)
|
1956
|
+
{
|
1957
|
+
debug_context_t *debug_context;
|
1958
|
+
|
1959
|
+
debug_check_started();
|
1960
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1961
|
+
return context_thread_0(debug_context);
|
1962
|
+
}
|
1963
|
+
|
1964
|
+
/*
|
1965
|
+
* call-seq:
|
1966
|
+
* context.thnum -> int
|
1967
|
+
*
|
1968
|
+
* Returns the context's number.
|
1969
|
+
*/
|
1970
|
+
static VALUE
|
1971
|
+
context_thnum(VALUE self)
|
1972
|
+
{
|
1973
|
+
debug_context_t *debug_context;
|
1974
|
+
|
1975
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
1976
|
+
return INT2FIX(debug_context->thnum);
|
1977
|
+
}
|
1978
|
+
|
1979
|
+
static void
|
1980
|
+
context_suspend_0(debug_context_t *debug_context)
|
1981
|
+
{
|
1982
|
+
VALUE status;
|
1983
|
+
|
1984
|
+
status = rb_funcall(context_thread_0(debug_context), rb_intern("status"), 0);
|
1985
|
+
if(rb_str_cmp(status, rb_str_new2("run")) == 0)
|
1986
|
+
CTX_FL_SET(debug_context, CTX_FL_WAS_RUNNING);
|
1987
|
+
else if(rb_str_cmp(status, rb_str_new2("sleep")) == 0)
|
1988
|
+
CTX_FL_UNSET(debug_context, CTX_FL_WAS_RUNNING);
|
1989
|
+
else
|
1990
|
+
return;
|
1991
|
+
CTX_FL_SET(debug_context, CTX_FL_SUSPEND);
|
1992
|
+
}
|
1993
|
+
|
1994
|
+
static void
|
1995
|
+
context_resume_0(debug_context_t *debug_context)
|
1996
|
+
{
|
1997
|
+
if(!CTX_FL_TEST(debug_context, CTX_FL_SUSPEND))
|
1998
|
+
return;
|
1999
|
+
CTX_FL_UNSET(debug_context, CTX_FL_SUSPEND);
|
2000
|
+
if(CTX_FL_TEST(debug_context, CTX_FL_WAS_RUNNING))
|
2001
|
+
rb_thread_wakeup(context_thread_0(debug_context));
|
2002
|
+
}
|
2003
|
+
|
2004
|
+
/*
|
2005
|
+
* call-seq:
|
2006
|
+
* context.suspend -> nil
|
2007
|
+
*
|
2008
|
+
* Suspends the thread when it is running.
|
2009
|
+
*/
|
2010
|
+
static VALUE
|
2011
|
+
context_suspend(VALUE self)
|
2012
|
+
{
|
2013
|
+
debug_context_t *debug_context;
|
2014
|
+
|
2015
|
+
debug_check_started();
|
2016
|
+
|
2017
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
2018
|
+
if(CTX_FL_TEST(debug_context, CTX_FL_SUSPEND))
|
2019
|
+
rb_raise(rb_eRuntimeError, "Already suspended.");
|
2020
|
+
context_suspend_0(debug_context);
|
2021
|
+
return Qnil;
|
2022
|
+
}
|
2023
|
+
|
2024
|
+
/*
|
2025
|
+
* call-seq:
|
2026
|
+
* context.suspended? -> bool
|
2027
|
+
*
|
2028
|
+
* Returns +true+ if the thread is suspended by debugger.
|
2029
|
+
*/
|
2030
|
+
static VALUE
|
2031
|
+
context_is_suspended(VALUE self)
|
2032
|
+
{
|
2033
|
+
debug_context_t *debug_context;
|
2034
|
+
|
2035
|
+
debug_check_started();
|
2036
|
+
|
2037
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
2038
|
+
return CTX_FL_TEST(debug_context, CTX_FL_SUSPEND) ? Qtrue : Qfalse;
|
2039
|
+
}
|
2040
|
+
|
2041
|
+
/*
|
2042
|
+
* call-seq:
|
2043
|
+
* context.resume -> nil
|
2044
|
+
*
|
2045
|
+
* Resumes the thread from the suspended mode.
|
2046
|
+
*/
|
2047
|
+
static VALUE
|
2048
|
+
context_resume(VALUE self)
|
2049
|
+
{
|
2050
|
+
debug_context_t *debug_context;
|
2051
|
+
|
2052
|
+
debug_check_started();
|
2053
|
+
|
2054
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
2055
|
+
if(!CTX_FL_TEST(debug_context, CTX_FL_SUSPEND))
|
2056
|
+
rb_raise(rb_eRuntimeError, "Thread is not suspended.");
|
2057
|
+
context_resume_0(debug_context);
|
2058
|
+
return Qnil;
|
2059
|
+
}
|
2060
|
+
|
2061
|
+
/*
|
2062
|
+
* call-seq:
|
2063
|
+
* context.tracing -> bool
|
2064
|
+
*
|
2065
|
+
* Returns the tracing flag for the current context.
|
2066
|
+
*/
|
2067
|
+
static VALUE
|
2068
|
+
context_tracing(VALUE self)
|
2069
|
+
{
|
2070
|
+
debug_context_t *debug_context;
|
2071
|
+
|
2072
|
+
debug_check_started();
|
2073
|
+
|
2074
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
2075
|
+
return CTX_FL_TEST(debug_context, CTX_FL_TRACING) ? Qtrue : Qfalse;
|
2076
|
+
}
|
2077
|
+
|
2078
|
+
/*
|
2079
|
+
* call-seq:
|
2080
|
+
* context.tracing = bool
|
2081
|
+
*
|
2082
|
+
* Controls the tracing for this context.
|
2083
|
+
*/
|
2084
|
+
static VALUE
|
2085
|
+
context_set_tracing(VALUE self, VALUE value)
|
2086
|
+
{
|
2087
|
+
debug_context_t *debug_context;
|
2088
|
+
|
2089
|
+
debug_check_started();
|
2090
|
+
|
2091
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
2092
|
+
if(RTEST(value))
|
2093
|
+
CTX_FL_SET(debug_context, CTX_FL_TRACING);
|
2094
|
+
else
|
2095
|
+
CTX_FL_UNSET(debug_context, CTX_FL_TRACING);
|
2096
|
+
return value;
|
2097
|
+
}
|
2098
|
+
|
2099
|
+
/*
|
2100
|
+
* call-seq:
|
2101
|
+
* context.ignored? -> bool
|
2102
|
+
*
|
2103
|
+
* Returns the ignore flag for the current context.
|
2104
|
+
*/
|
2105
|
+
static VALUE
|
2106
|
+
context_ignored(VALUE self)
|
2107
|
+
{
|
2108
|
+
debug_context_t *debug_context;
|
2109
|
+
|
2110
|
+
debug_check_started();
|
2111
|
+
|
2112
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
2113
|
+
return CTX_FL_TEST(debug_context, CTX_FL_IGNORE) ? Qtrue : Qfalse;
|
2114
|
+
}
|
2115
|
+
|
2116
|
+
/*
|
2117
|
+
* call-seq:
|
2118
|
+
* context.dead? -> bool
|
2119
|
+
*
|
2120
|
+
* Returns +true+ if context doesn't represent a live context and is created
|
2121
|
+
* during post-mortem exception handling.
|
2122
|
+
*/
|
2123
|
+
static VALUE
|
2124
|
+
context_dead(VALUE self)
|
2125
|
+
{
|
2126
|
+
debug_context_t *debug_context;
|
2127
|
+
|
2128
|
+
debug_check_started();
|
2129
|
+
|
2130
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
2131
|
+
return CTX_FL_TEST(debug_context, CTX_FL_DEAD) ? Qtrue : Qfalse;
|
2132
|
+
}
|
2133
|
+
|
2134
|
+
/*
|
2135
|
+
* call-seq:
|
2136
|
+
* context.stop_reason -> sym
|
2137
|
+
*
|
2138
|
+
* Returns the reason for the stop. It maybe of the following values:
|
2139
|
+
* :initial, :step, :breakpoint, :catchpoint, :post-mortem
|
2140
|
+
*/
|
2141
|
+
static VALUE
|
2142
|
+
context_stop_reason(VALUE self)
|
2143
|
+
{
|
2144
|
+
debug_context_t *debug_context;
|
2145
|
+
char * sym_name;
|
2146
|
+
|
2147
|
+
debug_check_started();
|
2148
|
+
|
2149
|
+
Data_Get_Struct(self, debug_context_t, debug_context);
|
2150
|
+
|
2151
|
+
switch(debug_context->stop_reason)
|
2152
|
+
{
|
2153
|
+
case CTX_STOP_STEP:
|
2154
|
+
sym_name = "step";
|
2155
|
+
break;
|
2156
|
+
case CTX_STOP_BREAKPOINT:
|
2157
|
+
sym_name = "breakpoint";
|
2158
|
+
break;
|
2159
|
+
case CTX_STOP_CATCHPOINT:
|
2160
|
+
sym_name = "catchpoint";
|
2161
|
+
break;
|
2162
|
+
case CTX_STOP_NONE:
|
2163
|
+
default:
|
2164
|
+
sym_name = "none";
|
2165
|
+
}
|
2166
|
+
if(CTX_FL_TEST(debug_context, CTX_FL_DEAD))
|
2167
|
+
sym_name = "post-mortem";
|
2168
|
+
|
2169
|
+
return ID2SYM(rb_intern(sym_name));
|
2170
|
+
}
|
2171
|
+
|
2172
|
+
|
2173
|
+
/*
|
2174
|
+
* Document-class: Context
|
2175
|
+
*
|
2176
|
+
* The Debugger module keeps a single instance of this class for
|
2177
|
+
* each Ruby thread. It contains a call-stack information, thread
|
2178
|
+
* information, breakpoint information and the reason the program is
|
2179
|
+
* stopped.
|
2180
|
+
*/
|
2181
|
+
static void
|
2182
|
+
Init_context()
|
2183
|
+
{
|
2184
|
+
cContext = rb_define_class_under(mDebugger, "Context", rb_cObject);
|
2185
|
+
rb_define_method(cContext, "stop_next=", context_stop_next, -1);
|
2186
|
+
rb_define_method(cContext, "step", context_stop_next, -1);
|
2187
|
+
rb_define_method(cContext, "step_over", context_step_over, -1);
|
2188
|
+
rb_define_method(cContext, "stop_frame=", context_stop_frame, 1);
|
2189
|
+
rb_define_method(cContext, "thread", context_thread, 0);
|
2190
|
+
rb_define_method(cContext, "thnum", context_thnum, 0);
|
2191
|
+
rb_define_method(cContext, "stop_reason", context_stop_reason, 0);
|
2192
|
+
rb_define_method(cContext, "suspend", context_suspend, 0);
|
2193
|
+
rb_define_method(cContext, "suspended?", context_is_suspended, 0);
|
2194
|
+
rb_define_method(cContext, "resume", context_resume, 0);
|
2195
|
+
rb_define_method(cContext, "tracing", context_tracing, 0);
|
2196
|
+
rb_define_method(cContext, "tracing=", context_set_tracing, 1);
|
2197
|
+
rb_define_method(cContext, "ignored?", context_ignored, 0);
|
2198
|
+
rb_define_method(cContext, "frame_args", context_frame_args, -1);
|
2199
|
+
rb_define_method(cContext, "frame_args_info", context_frame_args_info, -1);
|
2200
|
+
rb_define_method(cContext, "frame_binding", context_frame_binding, -1);
|
2201
|
+
rb_define_method(cContext, "frame_class", context_frame_class, -1);
|
2202
|
+
rb_define_method(cContext, "frame_file", context_frame_file, -1);
|
2203
|
+
rb_define_method(cContext, "frame_id", context_frame_id, -1);
|
2204
|
+
rb_define_method(cContext, "frame_line", context_frame_line, -1);
|
2205
|
+
rb_define_method(cContext, "frame_locals", context_frame_locals, -1);
|
2206
|
+
rb_define_method(cContext, "frame_method", context_frame_id, -1);
|
2207
|
+
rb_define_method(cContext, "frame_self", context_frame_self, -1);
|
2208
|
+
rb_define_method(cContext, "stack_size", context_stack_size, 0);
|
2209
|
+
rb_define_method(cContext, "dead?", context_dead, 0);
|
2210
|
+
rb_define_method(cContext, "breakpoint",
|
2211
|
+
context_breakpoint, 0); /* in breakpoint.c */
|
2212
|
+
rb_define_method(cContext, "set_breakpoint",
|
2213
|
+
context_set_breakpoint, -1); /* in breakpoint.c */
|
2214
|
+
}
|
2215
|
+
|
2216
|
+
/*
|
2217
|
+
* call-seq:
|
2218
|
+
* Debugger.breakpoints -> Array
|
2219
|
+
*
|
2220
|
+
* Returns an Array of Breakpoint objects; all the breakpoints that
|
2221
|
+
* have been created.
|
2222
|
+
*/
|
2223
|
+
static VALUE
|
2224
|
+
debug_breakpoints(VALUE self)
|
2225
|
+
{
|
2226
|
+
debug_check_started();
|
2227
|
+
|
2228
|
+
return rdebug_breakpoints;
|
2229
|
+
}
|
2230
|
+
|
2231
|
+
/*
|
2232
|
+
* call-seq:
|
2233
|
+
* Debugger.add_breakpoint(source, pos, condition = nil) -> breakpoint
|
2234
|
+
*
|
2235
|
+
* Adds a new breakpoint.
|
2236
|
+
* <i>source</i> is a name of a file or a class.
|
2237
|
+
* <i>pos</i> is a line number or a method name if <i>source</i> is a class name.
|
2238
|
+
* <i>condition</i> is a string which is evaluated to +true+ when this breakpoint
|
2239
|
+
* is activated.
|
2240
|
+
*/
|
2241
|
+
static VALUE
|
2242
|
+
debug_add_breakpoint(int argc, VALUE *argv, VALUE self)
|
2243
|
+
{
|
2244
|
+
VALUE result;
|
2245
|
+
|
2246
|
+
debug_check_started();
|
2247
|
+
|
2248
|
+
result = create_breakpoint_from_args(argc, argv, ++bkp_count);
|
2249
|
+
rb_ary_push(rdebug_breakpoints, result);
|
2250
|
+
return result;
|
2251
|
+
}
|
2252
|
+
|
2253
|
+
/*
|
2254
|
+
* Document-class: Debugger
|
2255
|
+
*
|
2256
|
+
* _Debugger_ is the module name space for ruby-debug.
|
2257
|
+
*/
|
2258
|
+
#if defined(_WIN32)
|
2259
|
+
__declspec(dllexport)
|
2260
|
+
#endif
|
2261
|
+
void
|
2262
|
+
Init_ruby_debug()
|
2263
|
+
{
|
2264
|
+
mDebugger = rb_define_module("Debugger");
|
2265
|
+
rb_define_const(mDebugger, "VERSION", rb_str_new2(DEBUG_VERSION));
|
2266
|
+
rb_define_module_function(mDebugger, "start_", debug_start, 0);
|
2267
|
+
rb_define_module_function(mDebugger, "stop", debug_stop, 0);
|
2268
|
+
rb_define_module_function(mDebugger, "started?", debug_is_started, 0);
|
2269
|
+
rb_define_module_function(mDebugger, "breakpoints", debug_breakpoints, 0);
|
2270
|
+
rb_define_module_function(mDebugger, "add_breakpoint", debug_add_breakpoint, -1);
|
2271
|
+
rb_define_module_function(mDebugger, "remove_breakpoint",
|
2272
|
+
rdebug_remove_breakpoint,
|
2273
|
+
1); /* in breakpoint.c */
|
2274
|
+
rb_define_module_function(mDebugger, "add_catchpoint",
|
2275
|
+
rdebug_add_catchpoint, 1); /* in breakpoint.c */
|
2276
|
+
rb_define_module_function(mDebugger, "catchpoints",
|
2277
|
+
debug_catchpoints, 0); /* in breakpoint.c */
|
2278
|
+
rb_define_module_function(mDebugger, "last_context", debug_last_interrupted, 0);
|
2279
|
+
rb_define_module_function(mDebugger, "contexts", debug_contexts, 0);
|
2280
|
+
rb_define_module_function(mDebugger, "current_context", debug_current_context, 0);
|
2281
|
+
rb_define_module_function(mDebugger, "thread_context", debug_thread_context, 1);
|
2282
|
+
rb_define_module_function(mDebugger, "suspend", debug_suspend, 0);
|
2283
|
+
rb_define_module_function(mDebugger, "resume", debug_resume, 0);
|
2284
|
+
rb_define_module_function(mDebugger, "tracing", debug_tracing, 0);
|
2285
|
+
rb_define_module_function(mDebugger, "tracing=", debug_set_tracing, 1);
|
2286
|
+
rb_define_module_function(mDebugger, "debug_load", debug_debug_load, -1);
|
2287
|
+
rb_define_module_function(mDebugger, "skip", debug_skip, 0);
|
2288
|
+
rb_define_module_function(mDebugger, "debug_at_exit", debug_at_exit, 0);
|
2289
|
+
rb_define_module_function(mDebugger, "post_mortem?", debug_post_mortem, 0);
|
2290
|
+
rb_define_module_function(mDebugger, "post_mortem=", debug_set_post_mortem, 1);
|
2291
|
+
rb_define_module_function(mDebugger, "keep_frame_binding?",
|
2292
|
+
debug_keep_frame_binding, 0);
|
2293
|
+
rb_define_module_function(mDebugger, "keep_frame_binding=",
|
2294
|
+
debug_set_keep_frame_binding, 1);
|
2295
|
+
rb_define_module_function(mDebugger, "track_frame_args?",
|
2296
|
+
debug_track_frame_args, 0);
|
2297
|
+
rb_define_module_function(mDebugger, "track_frame_args=",
|
2298
|
+
debug_set_track_frame_args, 1);
|
2299
|
+
rb_define_module_function(mDebugger, "debug", debug_debug, 0);
|
2300
|
+
rb_define_module_function(mDebugger, "debug=", debug_set_debug, 1);
|
2301
|
+
|
2302
|
+
cThreadsTable = rb_define_class_under(mDebugger, "ThreadsTable", rb_cObject);
|
2303
|
+
|
2304
|
+
cDebugThread = rb_define_class_under(mDebugger, "DebugThread", rb_cThread);
|
2305
|
+
rb_define_singleton_method(cDebugThread, "inherited",
|
2306
|
+
debug_thread_inherited, 1);
|
2307
|
+
|
2308
|
+
Init_context();
|
2309
|
+
Init_breakpoint();
|
2310
|
+
|
2311
|
+
idAtBreakpoint = rb_intern("at_breakpoint");
|
2312
|
+
idAtCatchpoint = rb_intern("at_catchpoint");
|
2313
|
+
idAtLine = rb_intern("at_line");
|
2314
|
+
idAtReturn = rb_intern("at_return");
|
2315
|
+
idAtTracing = rb_intern("at_tracing");
|
2316
|
+
idList = rb_intern("list");
|
2317
|
+
|
2318
|
+
rb_mObjectSpace = rb_const_get(rb_mKernel, rb_intern("ObjectSpace"));
|
2319
|
+
|
2320
|
+
rb_global_variable(&last_context);
|
2321
|
+
rb_global_variable(&last_thread);
|
2322
|
+
rb_global_variable(&locker);
|
2323
|
+
rb_global_variable(&rdebug_breakpoints);
|
2324
|
+
rb_global_variable(&rdebug_catchpoints);
|
2325
|
+
rb_global_variable(&rdebug_threads_tbl);
|
2326
|
+
}
|