[macruby-changes] [3880] MacRuby/trunk/spec/frozen

source_changes at macosforge.org source_changes at macosforge.org
Sun Mar 28 13:06:32 PDT 2010


Revision: 3880
          http://trac.macosforge.org/projects/ruby/changeset/3880
Author:   eloy.de.enige at gmail.com
Date:     2010-03-28 13:06:31 -0700 (Sun, 28 Mar 2010)
Log Message:
-----------
Update RubySpec to 4b2ea70bcbb0973dc81ef6fac0c42c1971d9acd6

Modified Paths:
--------------
    MacRuby/trunk/spec/frozen/core/array/cycle_spec.rb
    MacRuby/trunk/spec/frozen/core/array/select_spec.rb
    MacRuby/trunk/spec/frozen/core/bignum/abs_spec.rb
    MacRuby/trunk/spec/frozen/core/class/new_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/polar_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/rect_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/rectangular_spec.rb
    MacRuby/trunk/spec/frozen/core/continuation/element_reference_spec.rb
    MacRuby/trunk/spec/frozen/core/dir/fixtures/common.rb
    MacRuby/trunk/spec/frozen/core/dir/glob_spec.rb
    MacRuby/trunk/spec/frozen/core/dir/shared/glob.rb
    MacRuby/trunk/spec/frozen/core/enumerable/all_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerable/any_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerable/cycle_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerable/fixtures/classes.rb
    MacRuby/trunk/spec/frozen/core/enumerable/grep_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/case_compare_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/errno_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/exit_value_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/fixtures/common.rb
    MacRuby/trunk/spec/frozen/core/exception/message_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/name_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/to_s_spec.rb
    MacRuby/trunk/spec/frozen/core/file/basename_spec.rb
    MacRuby/trunk/spec/frozen/core/file/chown_spec.rb
    MacRuby/trunk/spec/frozen/core/file/inspect_spec.rb
    MacRuby/trunk/spec/frozen/core/file/lchmod_spec.rb
    MacRuby/trunk/spec/frozen/core/file/lchown_spec.rb
    MacRuby/trunk/spec/frozen/core/file/lstat_spec.rb
    MacRuby/trunk/spec/frozen/core/file/shared/stat.rb
    MacRuby/trunk/spec/frozen/core/file/size_spec.rb
    MacRuby/trunk/spec/frozen/core/file/stat/comparison_spec.rb
    MacRuby/trunk/spec/frozen/core/file/stat/size_spec.rb
    MacRuby/trunk/spec/frozen/core/file/stat/world_readable_spec.rb
    MacRuby/trunk/spec/frozen/core/file/stat/world_writable_spec.rb
    MacRuby/trunk/spec/frozen/core/file/symlink_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/file_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/owned_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/pipe_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/setgid_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/setuid_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/size_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/socket_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/symlink_spec.rb
    MacRuby/trunk/spec/frozen/core/fixnum/abs_spec.rb
    MacRuby/trunk/spec/frozen/core/float/to_int_spec.rb
    MacRuby/trunk/spec/frozen/core/hash/element_reference_spec.rb
    MacRuby/trunk/spec/frozen/core/hash/select_spec.rb
    MacRuby/trunk/spec/frozen/core/integer/gcd_spec.rb
    MacRuby/trunk/spec/frozen/core/integer/gcdlcm_spec.rb
    MacRuby/trunk/spec/frozen/core/integer/lcm_spec.rb
    MacRuby/trunk/spec/frozen/core/io/binmode_spec.rb
    MacRuby/trunk/spec/frozen/core/io/bytes_spec.rb
    MacRuby/trunk/spec/frozen/core/io/chars_spec.rb
    MacRuby/trunk/spec/frozen/core/io/close_spec.rb
    MacRuby/trunk/spec/frozen/core/io/closed_spec.rb
    MacRuby/trunk/spec/frozen/core/io/codepoints_spec.rb
    MacRuby/trunk/spec/frozen/core/io/dup_spec_disabled.rb
    MacRuby/trunk/spec/frozen/core/io/each_byte_spec.rb
    MacRuby/trunk/spec/frozen/core/io/each_char_spec.rb
    MacRuby/trunk/spec/frozen/core/io/eof_spec.rb
    MacRuby/trunk/spec/frozen/core/io/fcntl_spec.rb
    MacRuby/trunk/spec/frozen/core/io/fileno_spec.rb
    MacRuby/trunk/spec/frozen/core/io/fixtures/classes.rb
    MacRuby/trunk/spec/frozen/core/io/flush_spec.rb
    MacRuby/trunk/spec/frozen/core/io/for_fd_spec.rb
    MacRuby/trunk/spec/frozen/core/io/fsync_spec.rb
    MacRuby/trunk/spec/frozen/core/io/getbyte_spec.rb
    MacRuby/trunk/spec/frozen/core/io/getc_spec.rb
    MacRuby/trunk/spec/frozen/core/io/gets_spec.rb
    MacRuby/trunk/spec/frozen/core/io/initialize_spec.rb
    MacRuby/trunk/spec/frozen/core/io/inspect_spec.rb
    MacRuby/trunk/spec/frozen/core/io/ioctl_spec.rb
    MacRuby/trunk/spec/frozen/core/io/lineno_spec.rb
    MacRuby/trunk/spec/frozen/core/io/lines_spec_disabled.rb
    MacRuby/trunk/spec/frozen/core/io/new_spec.rb
    MacRuby/trunk/spec/frozen/core/io/open_spec.rb
    MacRuby/trunk/spec/frozen/core/io/output_spec.rb
    MacRuby/trunk/spec/frozen/core/io/pid_spec.rb
    MacRuby/trunk/spec/frozen/core/io/popen_spec.rb
    MacRuby/trunk/spec/frozen/core/io/print_spec.rb
    MacRuby/trunk/spec/frozen/core/io/printf_spec_disabled.rb
    MacRuby/trunk/spec/frozen/core/io/putc_spec.rb
    MacRuby/trunk/spec/frozen/core/io/puts_spec_disabled.rb
    MacRuby/trunk/spec/frozen/core/io/read_nonblock_spec.rb
    MacRuby/trunk/spec/frozen/core/io/read_spec.rb
    MacRuby/trunk/spec/frozen/core/io/readchar_spec.rb
    MacRuby/trunk/spec/frozen/core/io/readline_spec.rb
    MacRuby/trunk/spec/frozen/core/io/readpartial_spec.rb
    MacRuby/trunk/spec/frozen/core/io/reopen_spec.rb
    MacRuby/trunk/spec/frozen/core/io/rewind_spec_disabled.rb
    MacRuby/trunk/spec/frozen/core/io/shared/codepoints.rb
    MacRuby/trunk/spec/frozen/core/io/shared/each.rb
    MacRuby/trunk/spec/frozen/core/io/shared/new.rb
    MacRuby/trunk/spec/frozen/core/io/shared/pos.rb
    MacRuby/trunk/spec/frozen/core/io/shared/tty.rb
    MacRuby/trunk/spec/frozen/core/io/shared/write.rb
    MacRuby/trunk/spec/frozen/core/io/stat_spec.rb
    MacRuby/trunk/spec/frozen/core/io/sync_spec.rb
    MacRuby/trunk/spec/frozen/core/io/sysread_spec.rb
    MacRuby/trunk/spec/frozen/core/io/to_i_spec.rb
    MacRuby/trunk/spec/frozen/core/io/to_io_spec.rb
    MacRuby/trunk/spec/frozen/core/io/try_convert_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/Array_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/Float_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/caller_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/puts_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/system_spec.rb
    MacRuby/trunk/spec/frozen/core/marshal/load_spec.rb
    MacRuby/trunk/spec/frozen/core/marshal/restore_spec.rb
    MacRuby/trunk/spec/frozen/core/math/log2_spec.rb
    MacRuby/trunk/spec/frozen/core/module/autoload_spec.rb
    MacRuby/trunk/spec/frozen/core/module/fixtures/classes.rb
    MacRuby/trunk/spec/frozen/core/module/nesting_spec.rb
    MacRuby/trunk/spec/frozen/core/module/remove_class_variable_spec.rb
    MacRuby/trunk/spec/frozen/core/module/to_s_spec.rb
    MacRuby/trunk/spec/frozen/core/numeric/modulo_spec.rb
    MacRuby/trunk/spec/frozen/core/numeric/real_spec.rb
    MacRuby/trunk/spec/frozen/core/objectspace/add_finalizer_spec.rb
    MacRuby/trunk/spec/frozen/core/objectspace/call_finalizer_spec.rb
    MacRuby/trunk/spec/frozen/core/objectspace/finalizers_spec.rb
    MacRuby/trunk/spec/frozen/core/objectspace/remove_finalizer_spec.rb
    MacRuby/trunk/spec/frozen/core/objectspace/undefine_finalizer_spec.rb
    MacRuby/trunk/spec/frozen/core/precision/prec_spec.rb
    MacRuby/trunk/spec/frozen/core/process/detach_spec.rb
    MacRuby/trunk/spec/frozen/core/process/egid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/euid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/exit_spec.rb
    MacRuby/trunk/spec/frozen/core/process/getpgrp_spec.rb
    MacRuby/trunk/spec/frozen/core/process/getrlimit_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/groups_spec.rb
    MacRuby/trunk/spec/frozen/core/process/maxgroups_spec.rb
    MacRuby/trunk/spec/frozen/core/process/setrlimit_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/waitpid2_spec.rb
    MacRuby/trunk/spec/frozen/core/process/waitpid_spec.rb
    MacRuby/trunk/spec/frozen/core/rational/Rational_spec.rb
    MacRuby/trunk/spec/frozen/core/regexp/escape_spec.rb
    MacRuby/trunk/spec/frozen/core/regexp/inspect_spec.rb
    MacRuby/trunk/spec/frozen/core/regexp/union_spec.rb
    MacRuby/trunk/spec/frozen/core/signal/trap_spec.rb
    MacRuby/trunk/spec/frozen/core/string/split_spec.rb
    MacRuby/trunk/spec/frozen/core/string/sub_spec.rb
    MacRuby/trunk/spec/frozen/core/string/unpack_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/abort_on_exception_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/exit_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/fork_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/group_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/kill_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/list_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/priority_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/safe_level_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/start_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/terminate_spec.rb
    MacRuby/trunk/spec/frozen/core/threadgroup/enclose_spec.rb
    MacRuby/trunk/spec/frozen/core/threadgroup/enclosed_spec.rb
    MacRuby/trunk/spec/frozen/core/time/_load_spec.rb
    MacRuby/trunk/spec/frozen/core/time/inspect_spec.rb
    MacRuby/trunk/spec/frozen/core/time/to_s_spec.rb
    MacRuby/trunk/spec/frozen/core/time/tv_usec_spec.rb
    MacRuby/trunk/spec/frozen/language/BEGIN_spec_disabled.rb
    MacRuby/trunk/spec/frozen/language/defined_spec.rb
    MacRuby/trunk/spec/frozen/language/fixtures/defined.rb
    MacRuby/trunk/spec/frozen/language/fixtures/variables.rb
    MacRuby/trunk/spec/frozen/language/regexp/interpolation_spec.rb
    MacRuby/trunk/spec/frozen/language/variables_spec.rb
    MacRuby/trunk/spec/frozen/library/net/ftp/fixtures/server.rb
    MacRuby/trunk/spec/frozen/library/net/ftp/shared/putbinaryfile.rb
    MacRuby/trunk/spec/frozen/library/net/ftp/shared/puttextfile.rb
    MacRuby/trunk/spec/frozen/library/net/ftp/storbinary_spec.rb
    MacRuby/trunk/spec/frozen/library/net/ftp/storlines_spec.rb
    MacRuby/trunk/spec/frozen/library/socket/fixtures/classes.rb
    MacRuby/trunk/spec/frozen/library/socket/udpsocket/send_spec.rb
    MacRuby/trunk/spec/frozen/library/stringscanner/getch_spec.rb
    MacRuby/trunk/spec/frozen/shared/complex/abs.rb
    MacRuby/trunk/spec/frozen/shared/file/blockdev.rb
    MacRuby/trunk/spec/frozen/shared/file/chardev.rb
    MacRuby/trunk/spec/frozen/shared/file/size.rb
    MacRuby/trunk/spec/frozen/shared/file/sticky.rb
    MacRuby/trunk/spec/frozen/shared/rational/abs.rb
    MacRuby/trunk/spec/frozen/spec_helper.rb
    MacRuby/trunk/spec/frozen/upstream

Added Paths:
-----------
    MacRuby/trunk/spec/frozen/core/array/count_spec.rb
    MacRuby/trunk/spec/frozen/core/array/drop_spec.rb
    MacRuby/trunk/spec/frozen/core/array/drop_while_spec.rb
    MacRuby/trunk/spec/frozen/core/array/find_index_spec.rb
    MacRuby/trunk/spec/frozen/core/array/keep_if_spec.rb
    MacRuby/trunk/spec/frozen/core/array/shared/keep_if.rb
    MacRuby/trunk/spec/frozen/core/array/take_spec.rb
    MacRuby/trunk/spec/frozen/core/array/take_while_spec.rb
    MacRuby/trunk/spec/frozen/core/basicobject/__send___spec.rb
    MacRuby/trunk/spec/frozen/core/basicobject/equal_spec.rb
    MacRuby/trunk/spec/frozen/core/basicobject/equal_value_spec.rb
    MacRuby/trunk/spec/frozen/core/basicobject/instance_eval_spec.rb
    MacRuby/trunk/spec/frozen/core/basicobject/not_equal_spec.rb
    MacRuby/trunk/spec/frozen/core/basicobject/not_spec.rb
    MacRuby/trunk/spec/frozen/core/bignum/case_compare_spec.rb
    MacRuby/trunk/spec/frozen/core/bignum/fdiv_spec.rb
    MacRuby/trunk/spec/frozen/core/bignum/magnitude_spec.rb
    MacRuby/trunk/spec/frozen/core/bignum/shared/abs.rb
    MacRuby/trunk/spec/frozen/core/complex/eql_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/imaginary_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/magnitude_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/marshal_dump_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/marshal_load_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/phase_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/quo_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/to_f_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/to_i_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/to_r_spec.rb
    MacRuby/trunk/spec/frozen/core/complex/uminus_spec.rb
    MacRuby/trunk/spec/frozen/core/dir/to_path_spec.rb
    MacRuby/trunk/spec/frozen/core/encoding/_dump_spec.rb
    MacRuby/trunk/spec/frozen/core/encoding/_load_spec.rb
    MacRuby/trunk/spec/frozen/core/encoding/converter/insert_output_spec.rb
    MacRuby/trunk/spec/frozen/core/encoding/converter/inspect_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerable/each_entry_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerable/slice_before_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerator/feed_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerator/generator/
    MacRuby/trunk/spec/frozen/core/enumerator/generator/each_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerator/inspect_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerator/next_values_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerator/peek_values_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerator/yielder/
    MacRuby/trunk/spec/frozen/core/enumerator/yielder/append_spec.rb
    MacRuby/trunk/spec/frozen/core/enumerator/yielder/yield_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/args_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/destination_encoding_name_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/destination_encoding_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/error_bytes_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/error_char_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/incomplete_input_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/readagain_bytes_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/reason_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/result_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/signm_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/signo_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/source_encoding_name_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/source_encoding_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/status_spec.rb
    MacRuby/trunk/spec/frozen/core/exception/success_spec.rb
    MacRuby/trunk/spec/frozen/core/file/realdirpath_spec.rb
    MacRuby/trunk/spec/frozen/core/file/realpath_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/world_readable_spec.rb
    MacRuby/trunk/spec/frozen/core/filetest/world_writable_spec.rb
    MacRuby/trunk/spec/frozen/core/fixnum/case_compare_spec.rb
    MacRuby/trunk/spec/frozen/core/fixnum/even_spec.rb
    MacRuby/trunk/spec/frozen/core/fixnum/fdiv_spec.rb
    MacRuby/trunk/spec/frozen/core/fixnum/magnitude_spec.rb
    MacRuby/trunk/spec/frozen/core/fixnum/odd_spec.rb
    MacRuby/trunk/spec/frozen/core/fixnum/shared/abs.rb
    MacRuby/trunk/spec/frozen/core/fixnum/succ_spec.rb
    MacRuby/trunk/spec/frozen/core/float/angle_spec.rb
    MacRuby/trunk/spec/frozen/core/float/arg_spec.rb
    MacRuby/trunk/spec/frozen/core/float/case_compare_spec.rb
    MacRuby/trunk/spec/frozen/core/float/phase_spec.rb
    MacRuby/trunk/spec/frozen/core/float/quo_spec.rb
    MacRuby/trunk/spec/frozen/core/float/to_r_spec.rb
    MacRuby/trunk/spec/frozen/core/gc/count_spec.rb
    MacRuby/trunk/spec/frozen/core/gc/profiler/
    MacRuby/trunk/spec/frozen/core/gc/profiler/clear_spec.rb
    MacRuby/trunk/spec/frozen/core/gc/profiler/disable_spec.rb
    MacRuby/trunk/spec/frozen/core/gc/profiler/enable_spec.rb
    MacRuby/trunk/spec/frozen/core/gc/profiler/enabled_spec.rb
    MacRuby/trunk/spec/frozen/core/gc/profiler/report_spec.rb
    MacRuby/trunk/spec/frozen/core/gc/profiler/result_spec.rb
    MacRuby/trunk/spec/frozen/core/gc/profiler/total_time_spec.rb
    MacRuby/trunk/spec/frozen/core/hash/keep_if_spec.rb
    MacRuby/trunk/spec/frozen/core/integer/rationalize_spec.rb
    MacRuby/trunk/spec/frozen/core/io/binread_spec.rb
    MacRuby/trunk/spec/frozen/core/io/close_on_exec_spec.rb
    MacRuby/trunk/spec/frozen/core/io/copy_stream_spec.rb
    MacRuby/trunk/spec/frozen/core/io/external_encoding_spec.rb
    MacRuby/trunk/spec/frozen/core/io/fdatasync_spec.rb
    MacRuby/trunk/spec/frozen/core/io/internal_encoding_spec.rb
    MacRuby/trunk/spec/frozen/core/io/readbyte_spec.rb
    MacRuby/trunk/spec/frozen/core/io/set_encoding_spec.rb
    MacRuby/trunk/spec/frozen/core/io/ungetbyte_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/Complex_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/Rational_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/const_lookup_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/enum_for_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/initialize_clone_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/initialize_dup_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/not_match_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/require_relative_spec.rb
    MacRuby/trunk/spec/frozen/core/kernel/to_enum_spec.rb
    MacRuby/trunk/spec/frozen/core/matchdata/hash_spec.rb
    MacRuby/trunk/spec/frozen/core/math/cbrt_spec.rb
    MacRuby/trunk/spec/frozen/core/method/hash_spec.rb
    MacRuby/trunk/spec/frozen/core/module/class_exec_spec.rb
    MacRuby/trunk/spec/frozen/core/module/fixtures/autoload_ex1.rb
    MacRuby/trunk/spec/frozen/core/module/module_exec_spec.rb
    MacRuby/trunk/spec/frozen/core/module/public_instance_method_spec.rb
    MacRuby/trunk/spec/frozen/core/mutex/
    MacRuby/trunk/spec/frozen/core/mutex/lock_spec.rb
    MacRuby/trunk/spec/frozen/core/mutex/locked_spec.rb
    MacRuby/trunk/spec/frozen/core/mutex/sleep_spec.rb
    MacRuby/trunk/spec/frozen/core/mutex/synchronize_spec.rb
    MacRuby/trunk/spec/frozen/core/mutex/try_lock_spec.rb
    MacRuby/trunk/spec/frozen/core/mutex/unlock_spec.rb
    MacRuby/trunk/spec/frozen/core/nil/to_c_spec.rb
    MacRuby/trunk/spec/frozen/core/objectspace/count_objects_spec.rb
    MacRuby/trunk/spec/frozen/core/process/daemon_spec.rb
    MacRuby/trunk/spec/frozen/core/process/exec_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid/
    MacRuby/trunk/spec/frozen/core/process/gid/change_privilege_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid/eid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid/grant_privilege_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid/re_exchange_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid/re_exchangeable_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid/rid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid/sid_available_spec.rb
    MacRuby/trunk/spec/frozen/core/process/gid/switch_spec.rb
    MacRuby/trunk/spec/frozen/core/process/spawn_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/
    MacRuby/trunk/spec/frozen/core/process/status/_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/coredump_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/equal_value_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/exited_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/exitstatus_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/inspect_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/pid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/right_shift_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/signaled_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/stopped_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/stopsig_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/success_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/termsig_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/to_i_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/to_int_spec.rb
    MacRuby/trunk/spec/frozen/core/process/status/to_s_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/
    MacRuby/trunk/spec/frozen/core/process/sys/getegid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/geteuid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/getgid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/getuid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/issetugid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setegid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/seteuid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setgid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setregid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setresgid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setresuid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setreuid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setrgid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setruid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/sys/setuid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid/
    MacRuby/trunk/spec/frozen/core/process/uid/change_privilege_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid/eid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid/grant_privilege_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid/re_exchange_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid/re_exchangeable_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid/rid_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid/sid_available_spec.rb
    MacRuby/trunk/spec/frozen/core/process/uid/switch_spec.rb
    MacRuby/trunk/spec/frozen/core/random/marshal_dump_spec.rb
    MacRuby/trunk/spec/frozen/core/random/marshal_load_spec.rb
    MacRuby/trunk/spec/frozen/core/rational/magnitude_spec.rb
    MacRuby/trunk/spec/frozen/core/rational/marshal_dump_spec.rb
    MacRuby/trunk/spec/frozen/core/rational/marshal_load_spec.rb
    MacRuby/trunk/spec/frozen/core/string/case_compare_spec.rb
    MacRuby/trunk/spec/frozen/core/struct/tms/
    MacRuby/trunk/spec/frozen/core/struct/tms/cstime_spec.rb
    MacRuby/trunk/spec/frozen/core/struct/tms/cutime_spec.rb
    MacRuby/trunk/spec/frozen/core/struct/tms/element_reference_spec.rb
    MacRuby/trunk/spec/frozen/core/struct/tms/members_spec.rb
    MacRuby/trunk/spec/frozen/core/struct/tms/new_spec.rb
    MacRuby/trunk/spec/frozen/core/struct/tms/stime_spec.rb
    MacRuby/trunk/spec/frozen/core/struct/tms/utime_spec.rb
    MacRuby/trunk/spec/frozen/core/symbol/element_reference_spec.rb
    MacRuby/trunk/spec/frozen/core/symbol/encoding_spec.rb
    MacRuby/trunk/spec/frozen/core/symbol/length_spec.rb
    MacRuby/trunk/spec/frozen/core/symbol/match_spec.rb
    MacRuby/trunk/spec/frozen/core/symbol/next_spec.rb
    MacRuby/trunk/spec/frozen/core/symbol/size_spec.rb
    MacRuby/trunk/spec/frozen/core/symbol/slice_spec.rb
    MacRuby/trunk/spec/frozen/core/symbol/succ_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/add_trace_func_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/backtrace_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/exclusive_spec.rb
    MacRuby/trunk/spec/frozen/core/thread/set_trace_func_spec.rb
    MacRuby/trunk/spec/frozen/core/time/friday_spec.rb
    MacRuby/trunk/spec/frozen/core/time/monday_spec.rb
    MacRuby/trunk/spec/frozen/core/time/nsec_spec.rb
    MacRuby/trunk/spec/frozen/core/time/round_spec.rb
    MacRuby/trunk/spec/frozen/core/time/saturday_spec.rb
    MacRuby/trunk/spec/frozen/core/time/subsec_spec.rb
    MacRuby/trunk/spec/frozen/core/time/sunday_spec.rb
    MacRuby/trunk/spec/frozen/core/time/thursday_spec.rb
    MacRuby/trunk/spec/frozen/core/time/tuesday_spec.rb
    MacRuby/trunk/spec/frozen/core/time/tv_nsec_spec.rb
    MacRuby/trunk/spec/frozen/core/time/wednesday_spec.rb
    MacRuby/trunk/spec/frozen/core/unboundmethod/eql_spec.rb
    MacRuby/trunk/spec/frozen/core/unboundmethod/hash_spec.rb
    MacRuby/trunk/spec/frozen/core/unboundmethod/parameters_spec.rb
    MacRuby/trunk/spec/frozen/core/unboundmethod/source_location_spec.rb

Removed Paths:
-------------
    MacRuby/trunk/spec/frozen/core/enumerable/join_spec.rb

Added: MacRuby/trunk/spec/frozen/core/array/count_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/count_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/array/count_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Array#count" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/array/cycle_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/cycle_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/array/cycle_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,4 +1,4 @@
-describe "Enumerable#cycle" do
+describe "Array#cycle" do
   ruby_version_is '1.8.7' do
     it "returns nil and does nothing for non positive n or empty arrays" do
       [1,2,3].cycle(0){ throw "ball"}.should be_nil
@@ -17,5 +17,14 @@
       end.should == 42
       bomb.should == 0
     end
+
+    it "yields successive elements of the array repeatedly" do
+      b = []
+      [1,2,3].cycle do |elem|
+        b << elem
+        break if b.size == 7
+      end
+      b.should == [1,2,3,1,2,3,1]
+    end
   end
 end

Added: MacRuby/trunk/spec/frozen/core/array/drop_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/drop_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/array/drop_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Array#drop" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/array/drop_while_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/drop_while_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/array/drop_while_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Array#drop_while" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/array/find_index_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/find_index_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/array/find_index_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Array#find_index" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/array/keep_if_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/keep_if_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/array/keep_if_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,12 @@
+require File.expand_path('../shared/keep_if', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Array#keep_if" do
+    it "returns the same array if no changes were made" do
+      array = [1, 2, 3]
+      array.keep_if { true }.should equal(array)
+    end
+
+    it_behaves_like :keep_if, :keep_if
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/array/select_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/select_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/array/select_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,6 +1,7 @@
 require File.expand_path('../../../spec_helper', __FILE__)
 require File.expand_path('../fixtures/classes', __FILE__)
 require File.expand_path('../shared/enumeratorize', __FILE__)
+require File.expand_path('../shared/keep_if', __FILE__)
 
 describe "Array#select" do
   it_behaves_like :enumeratorize, :select
@@ -23,3 +24,13 @@
     array.select { false }.should == []
   end
 end
+
+ruby_version_is "1.9" do
+  describe "Array#select!" do
+    it "returns nil if no changes were made in the array" do
+      [1, 2, 3].select! { true }.should be_nil
+    end
+
+    it_behaves_like :keep_if, :select!
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/array/shared/keep_if.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/shared/keep_if.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/array/shared/keep_if.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,11 @@
+describe :keep_if, :shared => true do
+  it "deletes elements for which the block returns a false value" do
+    array = [1, 2, 3, 4, 5]
+    array.send(@method) {|item| item > 3 }.should equal(array)
+    array.should == [4, 5]
+  end
+
+  it "returns an enumerator if no block is given" do
+    [1, 2, 3].send(@method).should be_an_instance_of(enumerator_class)
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/array/take_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/take_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/array/take_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Array#take" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/array/take_while_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/take_while_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/array/take_while_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Array#take_while" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/basicobject/__send___spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/basicobject/__send___spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/basicobject/__send___spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "BasicObject#__send__" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/basicobject/equal_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/basicobject/equal_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/basicobject/equal_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "BasicObject#equal?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/basicobject/equal_value_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/basicobject/equal_value_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/basicobject/equal_value_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "BasicObject#==" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/basicobject/instance_eval_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/basicobject/instance_eval_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/basicobject/instance_eval_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "BasicObject#instance_eval" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/basicobject/not_equal_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/basicobject/not_equal_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/basicobject/not_equal_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "BasicObject#!=" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/basicobject/not_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/basicobject/not_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/basicobject/not_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "BasicObject#!" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/bignum/abs_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/bignum/abs_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/bignum/abs_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,8 +1,7 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/abs', __FILE__)
 
 describe "Bignum#abs" do
-  it "returns the absolute value" do
-    bignum_value(39).abs.should == 9223372036854775847
-    (-bignum_value(18)).abs.should == 9223372036854775826
-  end
+  it_behaves_like(:bignum_abs, :abs)
 end
+

Added: MacRuby/trunk/spec/frozen/core/bignum/case_compare_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/bignum/case_compare_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/bignum/case_compare_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Bignum#===" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/bignum/fdiv_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/bignum/fdiv_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/bignum/fdiv_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Bignum#fdiv" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/bignum/magnitude_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/bignum/magnitude_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/bignum/magnitude_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,10 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/abs', __FILE__)
+
+ruby_version_is '1.9' do
+  describe "Bignum#magnitude" do
+    it_behaves_like(:bignum_abs, :magnitude)
+  end
+end
+
+

Added: MacRuby/trunk/spec/frozen/core/bignum/shared/abs.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/bignum/shared/abs.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/bignum/shared/abs.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,6 @@
+describe :bignum_abs, :shared => true do
+  it "returns the absolute value" do
+    bignum_value(39).send(@method).should == 9223372036854775847
+    (-bignum_value(18)).send(@method).should == 9223372036854775826
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/class/new_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/class/new_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/class/new_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -88,3 +88,7 @@
     lambda { Class.new(Module.new) }.should raise_error(TypeError)
   end
 end
+
+describe "Class#new" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/complex/eql_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/eql_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/eql_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#eql?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/complex/imaginary_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/imaginary_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/imaginary_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#imaginary" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/complex/magnitude_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/magnitude_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/magnitude_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,8 @@
+ruby_version_is "1.9" do
+  
+  require File.expand_path('../../../shared/complex/abs', __FILE__)
+  
+  describe "Complex#magnitude" do
+    it_behaves_like(:complex_abs, :magnitude)
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/complex/marshal_dump_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/marshal_dump_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/marshal_dump_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#marshal_dump" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/complex/marshal_load_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/marshal_load_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/marshal_load_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#marshal_load" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/complex/phase_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/phase_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/phase_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#phase" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/complex/polar_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/polar_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/complex/polar_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,7 +3,12 @@
 ruby_version_is "1.9" do
 
   describe "Complex.polar" do
-    it_behaves_like(:complex_polar, :polar)
+    it_behaves_like(:complex_polar_class, :polar)
+
+    it "raises a TypeError when given non real arguments" do
+      lambda{ Complex.polar(nil)      }.should raise_error(TypeError)
+      lambda{ Complex.polar(nil, nil) }.should raise_error(TypeError)
+    end
   end
 
   describe "Complex#polar" do

Added: MacRuby/trunk/spec/frozen/core/complex/quo_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/quo_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/quo_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#quo" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/complex/rect_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/rect_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/complex/rect_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,4 +4,8 @@
   describe "Complex#rect" do
     it_behaves_like(:complex_rect, :rect)
   end
+
+  describe "Complex.rect" do
+    it "needs specs"
+  end
 end

Modified: MacRuby/trunk/spec/frozen/core/complex/rectangular_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/rectangular_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/complex/rectangular_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -7,4 +7,8 @@
   describe "Complex#rectangular" do
     it_behaves_like(:complex_rect, :rectangular)
   end
+
+  describe "Complex.rectangular" do
+    it "needs specs"
+  end
 end

Added: MacRuby/trunk/spec/frozen/core/complex/to_f_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/to_f_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/to_f_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#to_f" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/complex/to_i_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/to_i_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/to_i_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#to_i" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/complex/to_r_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/to_r_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/to_r_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#to_r" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/complex/uminus_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/complex/uminus_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/complex/uminus_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Complex#-@" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/continuation/element_reference_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/continuation/element_reference_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/continuation/element_reference_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -2,7 +2,7 @@
 require File.expand_path('../../../shared/continuation/call', __FILE__)
 
 with_feature :continuation do
-  describe "Continuation#call" do
+  describe "Continuation#[]" do
     it_behaves_like :continuation_call, :[]
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/dir/fixtures/common.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/dir/fixtures/common.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/dir/fixtures/common.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -63,6 +63,9 @@
         subdir_two/nondotfile
         subdir_two/nondotfile.ext
 
+        brace/a.js.rjs
+        brace/a.html.erb
+
         special/+
 
         special/^
@@ -144,6 +147,7 @@
       ..
       .dotfile
       .dotsubdir
+      brace
       deeply
       dir
       dir_filename_ordering

Modified: MacRuby/trunk/spec/frozen/core/dir/glob_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/dir/glob_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/dir/glob_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -55,6 +55,7 @@
   it "recursively matches any subdirectories except './' or '../' with '**/' and option File::FNM_DOTMATCH" do
     expected = %w[
       .dotsubdir/
+      brace/
       deeply/
       deeply/nested/
       deeply/nested/directory/

Modified: MacRuby/trunk/spec/frozen/core/dir/shared/glob.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/dir/shared/glob.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/dir/shared/glob.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -17,6 +17,7 @@
 
   it "matches non-dotfiles with '*'" do
     expected = %w[
+      brace
       deeply
       dir
       dir_filename_ordering
@@ -111,6 +112,7 @@
 
   it "matches non-dotfiles in the current directory with '**'" do
     expected = %w[
+      brace
       deeply
       dir
       dir_filename_ordering
@@ -131,6 +133,7 @@
 
   it "recursively matches any nondot subdirectories with '**/'" do
     expected = %w[
+      brace/
       deeply/
       deeply/nested/
       deeply/nested/directory/
@@ -188,6 +191,11 @@
     Dir.send(@method, '{,.}*').sort.should == DirSpecs.expected_paths
   end
 
+  it "respects the order of {} expressions, expanding left most first" do
+    files = Dir.send(@method, "brace/a{.js,.html}{.erb,.rjs}")
+    files.should == %w!brace/a.js.rjs brace/a.html.erb!
+  end
+
   it "matches special characters by escaping with a backslash with '\\<character>'" do
     Dir.mkdir 'foo^bar'
 

Added: MacRuby/trunk/spec/frozen/core/dir/to_path_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/dir/to_path_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/dir/to_path_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Dir#to_path" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/encoding/_dump_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/encoding/_dump_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/encoding/_dump_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding#_dump" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/encoding/_load_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/encoding/_load_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/encoding/_load_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding._load" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/encoding/converter/insert_output_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/encoding/converter/insert_output_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/encoding/converter/insert_output_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::Converter#insert_output" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/encoding/converter/inspect_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/encoding/converter/inspect_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/encoding/converter/inspect_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::Converter#inspect" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/enumerable/all_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerable/all_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/enumerable/all_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -21,19 +21,6 @@
     {}.all? { nil }.should == true
   end
 
-  it "raises an ArgumentError when any arguments provided" do
-    lambda { @enum.all?(Proc.new {}) }.should raise_error(ArgumentError)
-    lambda { @enum.all?(nil) }.should raise_error(ArgumentError)
-    lambda { @empty.all?(1) }.should raise_error(ArgumentError)
-    lambda { @enum1.all?(1) {} }.should raise_error(ArgumentError)
-    lambda { @enum2.all?(1, 2, 3) {} }.should raise_error(ArgumentError)
-  end
-
-  it "raises NoMethodError if there is no #each method defined" do
-    lambda { EnumerableSpecs::NoEach.new.all? }.should raise_error(NoMethodError)
-    lambda { EnumerableSpecs::NoEach.new.all? {} }.should raise_error(NoMethodError)
-  end
-
   it "does not hide exceptions out of #each" do
     lambda {
       EnumerableSpecs::ThrowingEach.new.all?

Modified: MacRuby/trunk/spec/frozen/core/enumerable/any_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerable/any_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/enumerable/any_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -28,11 +28,6 @@
     lambda { @enum2.any?(1, 2, 3) {} }.should raise_error(ArgumentError)
   end
 
-  it "raises NoMethodError if there is no #each method defined" do
-    lambda { EnumerableSpecs::NoEach.new.any? }.should raise_error(NoMethodError)
-    lambda { EnumerableSpecs::NoEach.new.any? {} }.should raise_error(NoMethodError)
-  end
-
   it "does not hide exceptions out of #each" do
     lambda {
       EnumerableSpecs::ThrowingEach.new.any?

Modified: MacRuby/trunk/spec/frozen/core/enumerable/cycle_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerable/cycle_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/enumerable/cycle_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -15,6 +15,15 @@
       end
     end
 
+    it "yields successive elements of the array repeatedly" do
+      b = []
+      EnumerableSpecs::Numerous.new(1,2,3).cycle do |elem|
+        b << elem
+        break if b.size == 7
+      end
+      b.should == [1,2,3,1,2,3,1]
+    end
+
     describe "passed a number n as an argument" do
       it "returns nil and does nothing for non positive n" do
         EnumerableSpecs::ThrowingEach.new.cycle(0){}.should be_nil

Added: MacRuby/trunk/spec/frozen/core/enumerable/each_entry_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerable/each_entry_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerable/each_entry_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,34 @@
+require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../fixtures/classes', __FILE__)
+
+ruby_version_is '1.9' do
+  describe "Enumerable#each_entry" do
+    before :each do
+      @enum = EnumerableSpecs::YieldsMixed.new
+      @entries = [1, [2], [3,4], [5,6,7], [8,9], nil, []]
+    end
+
+    it "yields multiple arguments as an array" do
+      acc = []
+      @enum.each_entry {|g| acc << g}.should equal(@enum)
+      acc.should == @entries
+    end
+
+    it "returns an enumerator if no block" do
+      e = @enum.each_entry
+      e.should be_an_instance_of(enumerator_class)
+      e.to_a.should == @entries
+    end
+
+    it "raises an Argument error when extra arguments" do
+      lambda { @enum.each_entry("one").to_a   }.should raise_error(ArgumentError)
+      lambda { @enum.each_entry("one"){}.to_a }.should raise_error(ArgumentError)
+    end
+
+    it "passes extra arguments to #each" do
+      enum = EnumerableSpecs::EachCounter.new(1, 2)
+      enum.each_entry(:foo, "bar").to_a.should == [1,2]
+      enum.arguments_passed.should == [:foo, "bar"]
+    end    
+  end
+end
\ No newline at end of file

Modified: MacRuby/trunk/spec/frozen/core/enumerable/fixtures/classes.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerable/fixtures/classes.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/enumerable/fixtures/classes.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -139,6 +139,19 @@
     end
   end
 
+  class YieldsMixed
+    include Enumerable
+    def each
+      yield 1
+      yield [2]
+      yield 3,4
+      yield 5,6,7
+      yield [8,9]
+      yield nil
+      yield []
+    end
+  end
+
   class ReverseComparable
     include Comparable
     def initialize(num)
@@ -169,4 +182,23 @@
       nil
     end
   end
+
+  class Undupable
+    attr_reader :initialize_called, :initialize_dup_called
+    def dup
+      raise "Can't, sorry"
+    end
+
+    def clone
+      raise "Can't, either, sorry"
+    end
+
+    def initialize
+      @initialize_dup = true
+    end
+
+    def initialize_dup(arg)
+      @initialize_dup_called = true
+    end
+  end
 end # EnumerableSpecs utility classes

Modified: MacRuby/trunk/spec/frozen/core/enumerable/grep_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerable/grep_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/enumerable/grep_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -23,4 +23,9 @@
     @a.grep(3..7).should == [4,6]
     @a.grep(3..7) {|a| a+1}.should == [5,7]
   end
+
+  it "can use $~ in the block when used with a Regexp" do
+    ary = ["aba", "aba"]
+    ary.grep(/a(b)a/) { $1 }.should == ["b", "b"]
+  end
 end

Deleted: MacRuby/trunk/spec/frozen/core/enumerable/join_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerable/join_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/enumerable/join_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,22 +0,0 @@
-require File.expand_path('../../../shared/array/join', __FILE__)
-require File.expand_path('../../array/fixtures/classes', __FILE__)
-
-ruby_version_is "1.9" do
-  describe "Enumerable#join" do
-    class Enum
-      include Enumerable
-      def initialize(*args)
-        @elements = args
-      end
-      def each
-        @elements.each {|e| yield e}
-      end
-      def <<(e)
-        @elements << e
-        self
-      end
-    end
-
-    it_behaves_like(:array_join, :join, Enum)
-  end
-end

Added: MacRuby/trunk/spec/frozen/core/enumerable/slice_before_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerable/slice_before_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerable/slice_before_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,77 @@
+require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../fixtures/classes', __FILE__)
+
+ruby_version_is '1.9' do
+  describe "Enumerable#slice_before" do
+    before :each do
+      @enum = EnumerableSpecs::Numerous.new(7,6,5,4,3,2,1)
+    end
+
+    describe "when given an argument and no block" do
+      it "calls === on the argument to determine when to yield" do
+        arg = mock "filter"
+        arg.should_receive(:===).and_return(false, true, false, false, false, true, false)
+        e = @enum.slice_before(arg)
+        e.should be_an_instance_of(enumerator_class)
+        e.to_a.should == [[7], [6, 5, 4, 3], [2, 1]]
+      end
+
+      it "doesn't yield an empty array if the filter matches the first entry or the last entry" do
+        arg = mock "filter"
+        arg.should_receive(:===).and_return(true).exactly(7)
+        e = @enum.slice_before(arg)
+        e.to_a.should == [[7], [6], [5], [4], [3], [2], [1]]
+      end
+
+      it "uses standard boolean as a test" do
+        arg = mock "filter"
+        arg.should_receive(:===).and_return(false, :foo, nil, false, false, 42, false)
+        e = @enum.slice_before(arg)
+        e.to_a.should == [[7], [6, 5, 4, 3], [2, 1]]
+      end
+    end
+
+    describe "when given a block" do
+      describe "and no argument" do
+        it "calls the block to determine when to yield" do
+          e = @enum.slice_before{|i| i == 6 || i == 2}
+          e.should be_an_instance_of(enumerator_class)
+          e.to_a.should == [[7], [6, 5, 4, 3], [2, 1]]
+        end
+      end
+
+      describe "and an argument" do
+        it "calls the block with a copy of that argument" do
+          arg = [:foo]
+          e = @enum.slice_before(arg) do |i, init|
+            init.should == arg
+            init.should_not equal(arg)
+            first = init
+            i == 6 || i == 2
+          end
+          e.should be_an_instance_of(enumerator_class)
+          e.to_a.should == [[7], [6, 5, 4, 3], [2, 1]]
+          e = @enum.slice_before(arg) do |i, init|
+            init.shoud_not equal(first)
+          end
+        end
+
+        quarantine! do # need to double-check with ruby-core. Might be wrong or too specific
+          it "duplicates the argument directly without calling dup" do
+            arg = EnumerableSpecs::Undupable.new
+            e = @enum.slice_before(arg) do |i, init|
+              init.initialize_dup_called.should be_true
+              false
+            end
+            e.to_a.should == [[7, 6, 5, 4, 3, 2, 1]]
+          end
+        end
+      end
+    end
+
+    it "raises an Argument error when given an incorrect number of arguments" do
+      lambda { @enum.slice_before("one", "two") }.should raise_error(ArgumentError)
+      lambda { @enum.slice_before }.should raise_error(ArgumentError)
+    end
+  end
+end
\ No newline at end of file

Added: MacRuby/trunk/spec/frozen/core/enumerator/feed_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerator/feed_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerator/feed_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Enumerator#feed" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/enumerator/generator/each_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerator/generator/each_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerator/generator/each_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Enumerator::Generator#each" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/enumerator/inspect_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerator/inspect_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerator/inspect_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Enumerator#inspect" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/enumerator/next_values_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerator/next_values_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerator/next_values_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Enumerator#next_values" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/enumerator/peek_values_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerator/peek_values_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerator/peek_values_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Enumerator#peek_values" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/enumerator/yielder/append_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerator/yielder/append_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerator/yielder/append_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Enumerator::Yielder#<<" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/enumerator/yielder/yield_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/enumerator/yielder/yield_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/enumerator/yielder/yield_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Enumerator::Yielder#yield" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/exception/args_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/args_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/args_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "NoMethodError#args" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/exception/case_compare_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/case_compare_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/exception/case_compare_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "SystemCallError.===" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/exception/destination_encoding_name_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/destination_encoding_name_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/destination_encoding_name_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,13 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::UndefinedConversionError#destination_encoding_name" do
+    it "needs to be reviewed for spec completeness"
+  end
+end
+
+ruby_version_is "1.9" do
+  describe "Encoding::InvalidByteSequenceError#destination_encoding_name" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/exception/destination_encoding_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/destination_encoding_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/destination_encoding_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,13 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::UndefinedConversionError#destination_encoding" do
+    it "needs to be reviewed for spec completeness"
+  end
+end
+
+ruby_version_is "1.9" do
+  describe "Encoding::InvalidByteSequenceError#destination_encoding" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/exception/errno_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/errno_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/exception/errno_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "SystemCallError#errno" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/exception/error_bytes_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/error_bytes_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/error_bytes_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::InvalidByteSequenceError#error_bytes" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/exception/error_char_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/error_char_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/error_char_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::UndefinedConversionError#error_char" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/exception/exit_value_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/exit_value_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/exception/exit_value_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "LocalJumpError#exit_value" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/exception/fixtures/common.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/fixtures/common.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/exception/fixtures/common.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -41,4 +41,10 @@
     end
 
   end
-end  
+
+  class OverrideToS < RuntimeError
+    def to_s
+      "this is from #to_s"
+    end
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/exception/incomplete_input_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/incomplete_input_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/incomplete_input_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::InvalidByteSequenceError#incomplete_input?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/exception/message_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/message_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/exception/message_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,7 +1,17 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/common', __FILE__)
 
 describe "Exception#message" do
-  it "returns the exception message" do
-    [Exception.new.message, Exception.new("Ouch!").message].should == ["Exception", "Ouch!"]
-  end  
+  it "returns the class name if there is no message" do
+    Exception.new.message.should == "Exception"
+  end
+
+  it "returns the message passed to #initialize" do
+    Exception.new("Ouch!").message.should == "Ouch!"
+  end
+
+  it "calls #to_s on self" do
+    exc = ExceptionSpecs::OverrideToS.new("you won't see this")
+    exc.message.should == "this is from #to_s"
+  end
 end

Modified: MacRuby/trunk/spec/frozen/core/exception/name_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/name_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/exception/name_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "NameError#name" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/exception/readagain_bytes_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/readagain_bytes_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/readagain_bytes_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::InvalidByteSequenceError#readagain_bytes" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/exception/reason_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/reason_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/reason_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "LocalJumpError#reason" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/exception/result_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/result_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/result_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "StopIteration#result" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/exception/signm_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/signm_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/signm_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "SignalException#signm" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/exception/signo_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/signo_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/signo_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "SignalException#signo" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/exception/source_encoding_name_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/source_encoding_name_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/source_encoding_name_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,13 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::UndefinedConversionError#source_encoding_name" do
+    it "needs to be reviewed for spec completeness"
+  end
+end
+
+ruby_version_is "1.9" do
+  describe "Encoding::InvalidByteSequenceError#source_encoding_name" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/exception/source_encoding_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/source_encoding_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/source_encoding_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,13 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Encoding::UndefinedConversionError#source_encoding" do
+    it "needs to be reviewed for spec completeness"
+  end
+end
+
+ruby_version_is "1.9" do
+  describe "Encoding::InvalidByteSequenceError#source_encoding" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/exception/status_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/status_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/status_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "SystemExit#status" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/exception/success_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/success_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/exception/success_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "SystemExit#success?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/exception/to_s_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/exception/to_s_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/exception/to_s_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "Exception#to_s" do
   it_behaves_like :to_s, :to_s
 end  
+
+describe "NameError#to_s" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/file/basename_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/basename_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/basename_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,17 +1,9 @@
 require File.expand_path('../../../spec_helper', __FILE__)
 
+# TODO: Fix these
 describe "File.basename" do
-  before :each do
-    @name = tmp("test.txt")
-    touch @name
-  end
-
-  after :each do
-    rm_r @name
-  end
-
   it "return the basename of a path (basic cases)" do
-    File.basename(@name).should == "test.txt"
+    File.basename("/Some/path/to/test.txt").should == "test.txt"
     File.basename(File.join("/tmp")).should == "tmp"
     File.basename(File.join(*%w( g f d s a b))).should == "b"
     File.basename("/tmp", ".*").should == "tmp"

Modified: MacRuby/trunk/spec/frozen/core/file/chown_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/chown_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/chown_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -134,3 +134,15 @@
     end
   end
 end
+
+ruby_version_is "1.9" do
+  describe "File.chown" do
+    it "needs to be reviewed for spec completeness"
+  end
+end
+
+ruby_version_is "1.9" do
+  describe "File#chown" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/file/inspect_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/inspect_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/inspect_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,8 +1,17 @@
 require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../../io/fixtures/classes', __FILE__)
 
 describe "File#inspect" do
-  it "returns string that contains 'closed' when invoked on closed file" do
-    IOSpecs.closed_file.inspect.should =~ /closed/
+  before :each do
+    @name = tmp("file_inspect.txt")
+    @file = File.open @name, "w"
   end
+
+  after :each do
+    @file.close unless @file.closed?
+    rm_r @name
+  end
+
+  it "returns a String" do
+    @file.inspect.should be_an_instance_of(String)
+  end
 end

Modified: MacRuby/trunk/spec/frozen/core/file/lchmod_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/lchmod_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/lchmod_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,7 +1,7 @@
 require File.expand_path('../../../spec_helper', __FILE__)
 
 describe "File.lchmod" do
-  platform_is_not :os => [:linux, :windows, :openbsd] do
+  platform_is_not :os => [:linux, :windows, :openbsd, :solaris] do
     before :each do
       @fname = tmp('file_chmod_test')
       @lname = @fname + '.lnk'

Modified: MacRuby/trunk/spec/frozen/core/file/lchown_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/lchown_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/lchown_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -57,3 +57,9 @@
     end
   end
 end
+
+ruby_version_is "1.9" do
+  describe "File.lchown" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/file/lstat_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/lstat_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/lstat_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -27,3 +27,7 @@
     end
   end
 end
+
+describe "File#lstat" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/file/realdirpath_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/realdirpath_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/file/realdirpath_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "File.realdirpath" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/file/realpath_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/realpath_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/file/realpath_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "File.realpath" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/file/shared/stat.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/shared/stat.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/shared/stat.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,6 +1,6 @@
 describe :file_stat, :shared => true do
   before :each do
-    @file = tmp('/i_exist')
+    @file = tmp('i_exist')
     touch(@file) { |f| f.write 'rubinius' }
   end
 

Modified: MacRuby/trunk/spec/frozen/core/file/size_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/size_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/size_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,15 +3,33 @@
 
 describe "File.size?" do
   it_behaves_like :file_size,                     :size?, File
+end
+
+describe "File.size?" do
   it_behaves_like :file_size_nil_when_missing,    :size?, File
+end
+
+describe "File.size?" do
   it_behaves_like :file_size_nil_when_empty,      :size?, File
+end
+
+describe "File.size?" do
   it_behaves_like :file_size_with_file_argument,  :size?, File
 end
 
 describe "File.size" do
   it_behaves_like :file_size,                     :size,  File
+end
+
+describe "File.size" do
   it_behaves_like :file_size_raise_when_missing,  :size,  File
+end
+
+describe "File.size" do
   it_behaves_like :file_size_0_when_empty,        :size,  File
+end
+
+describe "File.size" do
   it_behaves_like :file_size_with_file_argument,  :size,  File
 end
 

Modified: MacRuby/trunk/spec/frozen/core/file/stat/comparison_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/stat/comparison_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/stat/comparison_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -31,7 +31,6 @@
   end
 
   it "should also include Comparable and thus == shows mtime equality between two File::Stat objects" do
-    (@file1.stat == @file2.stat).should == true
     (@file1.stat == @file1.stat).should == true
     (@file2.stat == @file2.stat).should == true
 

Modified: MacRuby/trunk/spec/frozen/core/file/stat/size_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/stat/size_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/stat/size_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -11,3 +11,11 @@
   it_behaves_like :file_size,                     :size,  FileStat
   it_behaves_like :file_size_0_when_empty,        :size,  FileStat
 end
+
+describe "File::Stat#size" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "File::Stat#size?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/file/stat/world_readable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/stat/world_readable_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/stat/world_readable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -7,3 +7,9 @@
     it_behaves_like(:file_world_readable, :world_readable?, FileStat)
   end
 end
+
+ruby_version_is "1.9" do
+  describe "File::Stat#world_readable?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/file/stat/world_writable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/stat/world_writable_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/stat/world_writable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -9,3 +9,9 @@
 
   end
 end
+
+ruby_version_is "1.9" do
+  describe "File::Stat#world_writable?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/file/symlink_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/file/symlink_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/file/symlink_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -52,5 +52,8 @@
 
 describe "File.symlink?" do
   it_behaves_like :file_symlink, :symlink?, File
+end
+
+describe "File.symlink?" do
   it_behaves_like :file_symlink_nonexistent, :symlink?, File
 end

Modified: MacRuby/trunk/spec/frozen/core/filetest/file_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/file_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/filetest/file_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "File.file?" do
   it_behaves_like :file_file, :file?, File
 end
+
+describe "FileTest.file?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/filetest/owned_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/owned_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/filetest/owned_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "FileTest.owned?" do
   it_behaves_like :file_owned, :owned?, FileTest
 end
+
+describe "FileTest.owned?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/filetest/pipe_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/pipe_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/filetest/pipe_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "FileTest.pipe?" do
   it_behaves_like :file_pipe, :pipe?, FileTest
 end
+
+describe "FileTest.pipe?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/filetest/setgid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/setgid_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/filetest/setgid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "FileTest.setgid?" do
   it_behaves_like :file_setgid, :setgid?, FileTest
 end
+
+describe "FileTest.setgid?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/filetest/setuid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/setuid_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/filetest/setuid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "FileTest.setuid?" do
   it_behaves_like :file_setuid, :setuid?, FileTest
 end
+
+describe "FileTest.setuid?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/filetest/size_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/size_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/filetest/size_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,14 +3,32 @@
 
 describe "FileTest.size?" do
   it_behaves_like :file_size,                     :size?, FileTest
+end
+
+describe "FileTest.size?" do
   it_behaves_like :file_size_nil_when_missing,    :size?, FileTest
+end
+
+describe "FileTest.size?" do
   it_behaves_like :file_size_nil_when_empty,      :size?, FileTest
+end
+
+describe "FileTest.size?" do
   it_behaves_like :file_size_with_file_argument,  :size?, FileTest
 end
 
 describe "FileTest.size" do
   it_behaves_like :file_size,                     :size,  FileTest
+end
+
+describe "FileTest.size" do
   it_behaves_like :file_size_raise_when_missing,  :size,  FileTest
+end
+
+describe "FileTest.size" do
   it_behaves_like :file_size_0_when_empty,        :size,  FileTest
+end
+
+describe "FileTest.size" do
   it_behaves_like :file_size_with_file_argument,  :size,  FileTest
 end

Modified: MacRuby/trunk/spec/frozen/core/filetest/socket_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/socket_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/filetest/socket_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "FileTest.socket?" do
   it_behaves_like :file_socket, :socket?, FileTest
 end
+
+describe "FileTest.socket?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/filetest/symlink_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/symlink_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/filetest/symlink_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,5 +3,8 @@
 
 describe "FileTest.symlink?" do
   it_behaves_like :file_symlink, :symlink?, FileTest
+end
+
+describe "FileTest.symlink?" do
   it_behaves_like :file_symlink_nonexistent, :symlink?, File
 end

Added: MacRuby/trunk/spec/frozen/core/filetest/world_readable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/world_readable_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/filetest/world_readable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "FileTest.world_readable?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/filetest/world_writable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/filetest/world_writable_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/filetest/world_writable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "FileTest.world_writable?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/fixnum/abs_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/fixnum/abs_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/fixnum/abs_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,11 +1,7 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/abs', __FILE__)
 
 describe "Fixnum#abs" do
-  it "returns self's absolute value" do
-    { 0 => [0, -0, +0], 2 => [2, -2, +2], 100 => [100, -100, +100] }.each do |key, values|
-      values.each do |value|
-        value.abs.should == key
-      end
-    end
-  end
+  it_behaves_like :fixnum_abs, :abs
 end
+

Added: MacRuby/trunk/spec/frozen/core/fixnum/case_compare_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/fixnum/case_compare_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/fixnum/case_compare_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Fixnum#===" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/fixnum/even_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/fixnum/even_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/fixnum/even_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Fixnum#even?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/fixnum/fdiv_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/fixnum/fdiv_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/fixnum/fdiv_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Fixnum#fdiv" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/fixnum/magnitude_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/fixnum/magnitude_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/fixnum/magnitude_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,8 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/abs', __FILE__)
+
+ruby_version_is '1.9' do
+  describe "Fixnum#magnitude" do
+    it_behaves_like :fixnum_abs, :magnitude
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/fixnum/odd_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/fixnum/odd_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/fixnum/odd_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Fixnum#odd?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Copied: MacRuby/trunk/spec/frozen/core/fixnum/shared/abs.rb (from rev 3879, MacRuby/trunk/spec/frozen/core/fixnum/abs_spec.rb)
===================================================================
--- MacRuby/trunk/spec/frozen/core/fixnum/shared/abs.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/fixnum/shared/abs.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,9 @@
+describe :fixnum_abs, :shared => true do
+  it "returns self's absolute value" do
+    { 0 => [0, -0, +0], 2 => [2, -2, +2], 100 => [100, -100, +100] }.each do |key, values|
+      values.each do |value|
+        value.send(@method).should == key
+      end
+    end
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/fixnum/succ_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/fixnum/succ_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/fixnum/succ_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Fixnum#succ" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/float/angle_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/float/angle_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/float/angle_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Float#angle" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/float/arg_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/float/arg_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/float/arg_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Float#arg" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/float/case_compare_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/float/case_compare_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/float/case_compare_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Float#===" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/float/phase_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/float/phase_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/float/phase_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Float#phase" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/float/quo_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/float/quo_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/float/quo_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Float#quo" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/float/to_int_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/float/to_int_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/float/to_int_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "Float#" do
   it_behaves_like(:float_to_i, :to_int)
 end
+
+describe "Float#to_int" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/float/to_r_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/float/to_r_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/float/to_r_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Float#to_r" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/gc/count_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/gc/count_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/gc/count_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "GC.count" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/gc/profiler/clear_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/gc/profiler/clear_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/gc/profiler/clear_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "GC::Profiler.clear" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/gc/profiler/disable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/gc/profiler/disable_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/gc/profiler/disable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "GC::Profiler.disable" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/gc/profiler/enable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/gc/profiler/enable_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/gc/profiler/enable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "GC::Profiler.enable" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/gc/profiler/enabled_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/gc/profiler/enabled_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/gc/profiler/enabled_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "GC::Profiler.enabled?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/gc/profiler/report_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/gc/profiler/report_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/gc/profiler/report_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "GC::Profiler.report" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/gc/profiler/result_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/gc/profiler/result_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/gc/profiler/result_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "GC::Profiler.result" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/gc/profiler/total_time_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/gc/profiler/total_time_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/gc/profiler/total_time_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "GC::Profiler.total_time" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/hash/element_reference_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/hash/element_reference_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/hash/element_reference_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -115,3 +115,7 @@
     x.tainted?.should == true
   end
 end
+
+describe "Hash.[]" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/hash/keep_if_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/hash/keep_if_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/hash/keep_if_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Hash#keep_if" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/hash/select_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/hash/select_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/hash/select_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -62,3 +62,9 @@
   end
 
 end
+
+ruby_version_is "1.9" do
+  describe "Hash#select!" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/integer/gcd_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/integer/gcd_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/integer/gcd_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -52,9 +52,9 @@
       lambda { 12.gcd(30, 20) }.should raise_error(ArgumentError)
     end
 
-    it "raises an ArgumentError unless the argument is an Integer" do
-      lambda { 39.gcd(3.8) }.should raise_error(ArgumentError)
-      lambda { 45872.gcd([]) }.should raise_error(ArgumentError)
+    it "raises a TypeError unless the argument is an Integer" do
+      lambda { 39.gcd(3.8)   }.should raise_error(TypeError)
+      lambda { 45872.gcd([]) }.should raise_error(TypeError)
     end  
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/integer/gcdlcm_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/integer/gcdlcm_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/integer/gcdlcm_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -47,9 +47,9 @@
       lambda { 12.gcdlcm(30, 20) }.should raise_error(ArgumentError)
     end
 
-    it "raises an ArgumentError unless the argument is an Integer" do
-      lambda { 39.gcdlcm(3.8) }.should raise_error(ArgumentError)
-      lambda { 45872.gcdlcm([]) }.should raise_error(ArgumentError)
+    it "raises an TypeError unless the argument is an Integer" do
+      lambda { 39.gcdlcm(3.8)   }.should raise_error(TypeError)
+      lambda { 45872.gcdlcm([]) }.should raise_error(TypeError)
     end  
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/integer/lcm_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/integer/lcm_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/integer/lcm_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -52,9 +52,9 @@
       lambda { 12.lcm(30, 20) }.should raise_error(ArgumentError)
     end
 
-    it "raises an ArgumentError unless the argument is an Integer" do
-      lambda { 39.lcm(3.8) }.should raise_error(ArgumentError)
-      lambda { 45872.lcm([]) }.should raise_error(ArgumentError)
+    it "raises an TypeError unless the argument is an Integer" do
+      lambda { 39.lcm(3.8)   }.should raise_error(TypeError)
+      lambda { 45872.lcm([]) }.should raise_error(TypeError)
     end  
   end
 end

Added: MacRuby/trunk/spec/frozen/core/integer/rationalize_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/integer/rationalize_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/integer/rationalize_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Integer#rationalize" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/binmode_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/binmode_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/binmode_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -15,14 +15,14 @@
   ruby_version_is ""..."1.9" do
     ruby_bug "#2046", "1.8.7.174" do
       it "raises an IOError on closed stream" do
-        lambda { IOSpecs.closed_file.binmode }.should raise_error(IOError)
+        lambda { IOSpecs.closed_io.binmode }.should raise_error(IOError)
       end
     end
   end
 
   ruby_version_is "1.9" do
     it "raises an IOError on closed stream" do
-      lambda { IOSpecs.closed_file.binmode }.should raise_error(IOError)
+      lambda { IOSpecs.closed_io.binmode }.should raise_error(IOError)
     end
   end
 
@@ -31,3 +31,9 @@
     lambda { @file.binmode }.should_not raise_error
   end
 end
+
+ruby_version_is "1.9" do
+  describe "IO#binmode?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/io/binread_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/binread_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/binread_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO.binread" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/bytes_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/bytes_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/bytes_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -21,12 +21,19 @@
       enum.first(5).should == [81, 117, 105, 32, 195]
     end
 
-    it "does not yield to a block" do
-      @io.bytes{ flunk }.should be_an_instance_of(enumerator_class)
+    it "yields each byte" do
+      count = 0
+      ScratchPad.record []
+      @io.each_byte do |byte|
+        ScratchPad << byte
+        break if 4 < count += 1
+      end
+
+      ScratchPad.recorded.should == [86, 111, 105, 99, 105]
     end
 
     it "raises an IOError on closed stream" do
-      enum = IOSpecs.closed_file.bytes
+      enum = IOSpecs.closed_io.bytes
       lambda { enum.first }.should raise_error(IOError)
     end
 

Modified: MacRuby/trunk/spec/frozen/core/io/chars_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/chars_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/chars_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -22,17 +22,26 @@
     end
 
     ruby_version_is '1.9' do
-      it "ignores a block" do
-        @io.chars{ raise "oups" }.should be_an_instance_of(enumerator_class)
+      it "yields each character" do
+        @io.readline.should == "Voici la ligne une.\n"
+
+        count = 0
+        ScratchPad.record []
+        @io.each_char do |c|
+          ScratchPad << c
+          break if 4 < count += 1
+        end
+
+        ScratchPad.recorded.should == ["Q", "u", "i", " ", "è"]
       end
     end
 
     it "returns an enumerator for a closed stream" do
-      IOSpecs.closed_file.chars.should be_an_instance_of(enumerator_class)
+      IOSpecs.closed_io.chars.should be_an_instance_of(enumerator_class)
     end
 
     it "raises an IOError when an enumerator created on a closed stream is accessed" do
-      lambda { IOSpecs.closed_file.chars.first }.should raise_error(IOError)
+      lambda { IOSpecs.closed_io.chars.first }.should raise_error(IOError)
     end
 
     it "raises an IOError when the stream for the enumerator is closed" do

Added: MacRuby/trunk/spec/frozen/core/io/close_on_exec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/close_on_exec_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/close_on_exec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,13 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO#close_on_exec=" do
+    it "needs to be reviewed for spec completeness"
+  end
+end
+
+ruby_version_is "1.9" do
+  describe "IO#close_on_exec?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/close_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/close_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/close_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,18 +1,19 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
 
 describe "IO#close" do
   before :each do
-    @path = tmp('io.close.txt')
-    @io = File.open @path, 'w'
+    @name = tmp('io_close.txt')
+    @io = new_io @name
   end
 
   after :each do
     @io.close unless @io.closed?
-    p = File.unlink(@path) 
+    rm_r @name
   end
 
   it "closes the stream" do
-    lambda { @io.close }.should_not raise_error
+    @io.close
     @io.closed?.should == true
   end
 
@@ -20,26 +21,20 @@
     @io.close.should == nil
   end
 
-  it "makes the stream unavailable for any further data operations" do
+  it "raises an IOError reading from a closed IO" do
     @io.close
-
-    lambda { @io.write "attempt to write" }.should raise_error(IOError)
     lambda { @io.read }.should raise_error(IOError)
   end
 
-  it "raises an IOError on subsequent invocations" do
+  it "raises an IOError writing to a closed IO" do
     @io.close
-
-    lambda { @io.close }.should raise_error(IOError)
+    lambda { @io.write "data" }.should raise_error(IOError)
   end
 
-  it "raises when a file descriptor is closed twice" do
-    io2 = IO.new @io.fileno
+  it "raises an IOError if closed" do
     @io.close
-
-    lambda { io2.close }.should raise_error(Errno::EBADF)
+    lambda { @io.close }.should raise_error(IOError)
   end
-
 end
 
 describe "IO#close on an IO.popen stream" do

Modified: MacRuby/trunk/spec/frozen/core/io/closed_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/closed_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/closed_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -11,7 +11,7 @@
   end
 
   it "returns true on closed stream" do
-    IOSpecs.closed_file.closed?.should be_true
+    IOSpecs.closed_io.closed?.should be_true
   end
 
   it "returns false on open stream" do

Modified: MacRuby/trunk/spec/frozen/core/io/codepoints_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/codepoints_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/codepoints_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -17,8 +17,11 @@
       @io.close unless @io.closed?
     end
 
-    it "does not yield to a block" do
-      @io.codepoints{ flunk }.should be_an_instance_of(enumerator_class)
+    it "calls the given block" do
+      r = []
+      @io.codepoints { |c| r << c }
+      r[24].should == 232
+      r.last.should == 10
     end
   end
 end

Added: MacRuby/trunk/spec/frozen/core/io/copy_stream_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/copy_stream_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/copy_stream_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO.copy_stream" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/dup_spec_disabled.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/dup_spec_disabled.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/dup_spec_disabled.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -70,6 +70,6 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.dup }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.dup }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/each_byte_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/each_byte_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/each_byte_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -15,7 +15,7 @@
     # each_byte must have a block in order to raise the Error.
     # MRI 1.8.7 returns enumerator if block is not provided.
     # See [ruby-core:16557].
-    lambda { IOSpecs.closed_file.each_byte {} }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.each_byte {} }.should raise_error(IOError)
   end
 
   it "yields each byte" do

Modified: MacRuby/trunk/spec/frozen/core/io/each_char_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/each_char_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/each_char_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -16,7 +16,7 @@
     end
 
     it "raises IOError on closed stream" do
-      lambda { IOSpecs.closed_file.each_char {} }.should raise_error(IOError)
+      lambda { IOSpecs.closed_io.each_char {} }.should raise_error(IOError)
     end
 
     it "yields each character" do

Modified: MacRuby/trunk/spec/frozen/core/io/eof_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/eof_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/eof_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,6 +3,27 @@
 
 describe "IO#eof?" do
   before :each do
+    @name = tmp("empty.txt")
+    touch @name
+  end
+
+  after :each do
+    rm_r @name
+  end
+
+  it "returns true on an empty stream that has just been opened" do
+    File.open(@name) { |empty| empty.eof?.should == true }
+  end
+
+  it "raises IOError on stream not opened for reading" do
+    lambda do
+      File.open(@name, "w") { |f| f.eof? }
+    end.should raise_error(IOError)
+  end
+end
+
+describe "IO#eof?" do
+  before :each do
     @name = fixture __FILE__, "lines.txt"
     @io = IOSpecs.io_fixture "lines.txt"
   end
@@ -36,14 +57,6 @@
     @io.eof?.should == true
   end
 
-  it "returns true on just opened empty stream" do
-    File.open(tmp('empty.txt'), "w") { |empty| } # ensure it exists
-    File.open(tmp('empty.txt')) { |empty|
-      empty.eof?.should == true
-    }
-    File.unlink(tmp("empty.txt"))
-  end
-
   it "returns false on just opened non-empty stream" do
     @io.eof?.should == false
   end
@@ -63,19 +76,9 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.eof? }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.eof? }.should raise_error(IOError)
   end
 
-  it "raises IOError on stream not opened for reading" do
- 
-    File.open(tmp('empty.txt'), "w") { |empty|
-      lambda {
-        empty.eof?
-      }.should raise_error(IOError)
-    }
-    File.unlink(tmp("empty.txt"))
-  end
-
   it "raises IOError on stream closed for reading by close_read" do
     @io.close_read
     lambda { @io.eof? }.should raise_error(IOError)

Added: MacRuby/trunk/spec/frozen/core/io/external_encoding_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/external_encoding_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/external_encoding_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO#external_encoding" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/fcntl_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/fcntl_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/fcntl_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,6 +3,6 @@
 
 describe "IO#fcntl" do
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.fcntl(5, 5) }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.fcntl(5, 5) }.should raise_error(IOError)
   end
 end

Added: MacRuby/trunk/spec/frozen/core/io/fdatasync_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/fdatasync_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/fdatasync_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO#fdatasync" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/fileno_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/fileno_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/fileno_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -7,6 +7,6 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.fileno }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.fileno }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/fixtures/classes.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/fixtures/classes.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/fixtures/classes.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -48,22 +48,27 @@
       "Est\303\241 aqui a linha cinco.\nHere is line six.\n" ]
   end
 
+  # Creates an IO instance for an existing fixture file. The
+  # file should obviously not be deleted.
   def self.io_fixture(name, mode="r:utf-8")
     path = fixture __FILE__, name
-    if File.exists? path
-      File.open path, fmode(mode)
-    else
-      File.open name, fmode(mode)
-    end
+    name = path if File.exists? path
+    new_io name, fmode(mode)
   end
 
-  def self.closed_file
-    File.open(fixture(__FILE__, "lines.txt"), fmode("r:utf-8")) { |f| f }
+  # Returns a closed instance of IO that was opened to reference
+  # a fixture file (i.e. the IO instance was perfectly valid at
+  # one point but is now closed).
+  def self.closed_io
+    io = io_fixture "lines.txt"
+    io.close
+    io
   end
 
-  class NotConvertable
-    def to_io
-      raise TypeError
-    end
+  # Defines +method+ on +obj+ using the provided +block+. This
+  # special helper is needed for e.g. IO.open specs to avoid
+  # mock methods preventing IO#close from running.
+  def self.io_mock(obj, method, &block)
+    obj.metaclass.send(:define_method, method, &block)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/flush_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/flush_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/flush_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,6 +3,6 @@
 
 describe "IO#flush" do
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.flush }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.flush }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/for_fd_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/for_fd_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/for_fd_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "IO.for_fd" do
   it_behaves_like :io_new, :for_fd
 end
+
+describe "IO.for_fd" do
+  it_behaves_like :io_new_errors, :for_fd
+end

Modified: MacRuby/trunk/spec/frozen/core/io/fsync_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/fsync_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/fsync_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -2,23 +2,23 @@
 require File.expand_path('../fixtures/classes', __FILE__)
 
 describe "IO#fsync" do
-   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.fsync }.should raise_error(IOError)
+  before :each do
+    @name = tmp("io_fsync.txt")
+    ScratchPad.clear
   end
 
+  after :each do
+    rm_r @name
+  end
+
+  it "raises an IOError on closed stream" do
+    lambda { IOSpecs.closed_io.fsync }.should raise_error(IOError)
+  end
+
   it "writes the buffered data to permanent storage" do
-    ret = ""
-    File.open(tmp("fsync-specs"), "w") do |f|
+    File.open(@name, "w") do |f|
       f.write "one hit wonder"
-      lambda { 
-        ret = f.fsync
-      }.should_not raise_error
+      f.fsync.should == 0
     end
-
-    # it returns nil on unsupported systems
-    [0, nil].include?(ret).should == true
-
-    File.unlink(tmp("fsync-specs"))
   end
-  
 end

Modified: MacRuby/trunk/spec/frozen/core/io/getbyte_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/getbyte_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/getbyte_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -26,7 +26,7 @@
     end
 
     it "raises an IOError on closed stream" do
-      lambda { IOSpecs.closed_file.getbyte }.should raise_error(IOError)
+      lambda { IOSpecs.closed_io.getbyte }.should raise_error(IOError)
     end
   end
 

Modified: MacRuby/trunk/spec/frozen/core/io/getc_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/getc_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/getc_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -35,7 +35,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.getc }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.getc }.should raise_error(IOError)
   end
 end
 

Modified: MacRuby/trunk/spec/frozen/core/io/gets_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/gets_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/gets_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -30,7 +30,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.gets }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.gets }.should raise_error(IOError)
   end
 
   describe "with no separator" do
@@ -158,31 +158,6 @@
   end
 end
 
-describe "IO#gets" do
-  before :each do
-    @name = tmp("io_gets")
-  end
-
-  after :each do
-    @io.close unless @io.closed?
-    rm_r @name
-  end
-
-  it "raises an IOErro on the clone of a stream not open for reading" do
-    @io = File.open @name, fmode("w:utf-8")
-    @io.puts "data for a cloned IO"
-
-    dup_io = IO.new @io.fileno
-    @io.fileno.should == dup_io.fileno
-
-    lambda { dup_io.gets }.should raise_error(IOError)
-
-    # dup_io should not be closed because it may cause an
-    # Errno::EBADF. This should be implementation-defined
-    # so the expectation for this error has been removed.
-  end
-end
-
 ruby_version_is "1.9" do
   describe "IO#gets" do
     before :each do
@@ -190,43 +165,43 @@
     end
 
     after :each do
-      @file.close
+      @io.close
       rm_r @name
     end
 
     it "accepts an integer as first parameter to limit the output's size" do
       touch(@name) { |f| f.print("waduswadus") }
 
-      @file = File.open @name, fmode("r:utf-8")
-      @file.gets(5).should == "wadus"
+      @io = new_io @name, fmode("r:utf-8")
+      @io.gets(5).should == "wadus"
     end
 
     it "accepts an integer as second parameter to limit the output's size" do
-      touch(@file) { |f| f.print("wa\n\ndus\n\nwadus") }
+      touch(@name) { |f| f.print("wa\n\ndus\n\nwadus") }
 
-      @file = File.open @name, fmode("r:utf-8")
-      @file.gets('\n\n', 5).should == "wa\n\nd"
+      @io = new_io @name, fmode("r:utf-8")
+      @io.gets('\n\n', 5).should == "wa\n\nd"
     end
 
     it "accepts an integer as limit parameter which is smaller than IO size" do
-      touch(@file) { |f| f.print("ABCD\n") }
+      touch(@name) { |f| f.print("ABCD\n") }
 
-      @file = File.open @name, fmode("r:utf-8")
-      @file.gets("", 2).should == "AB"
+      @io = new_io @name, fmode("r:utf-8")
+      @io.gets("", 2).should == "AB"
     end
 
     it "accepts an integer as limit parameter which is same as IO size" do
-      touch(@file) { |f| f.print("ABC\n") }
+      touch(@name) { |f| f.print("ABC\n") }
 
-      @file = File.open @name, fmode("r:utf-8")
-      @file.gets("", 4).should == "ABC\n"
+      @io = new_io @name, fmode("r:utf-8")
+      @io.gets("", 4).should == "ABC\n"
     end
 
     it "accepts an integer as limit parameter which is greater than IO size" do
-      touch(@file) { |f| f.print("A\n") }
+      touch(@name) { |f| f.print("A\n") }
 
-      @file = File.open @name, fmode("r:utf-8")
-      @file.gets("", 10).should == "A\n"
+      @io = new_io @name, fmode("r:utf-8")
+      @io.gets("", 10).should == "A\n"
     end
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/initialize_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/initialize_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/initialize_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,84 +3,50 @@
 
 describe "IO#initialize" do
   before :each do
-    @io = IO.allocate
+    @name = tmp("io_initialize.txt")
+    @io = new_io @name
   end
 
-  it "succeeds when fd is a Fixnum" do
-    lambda { @io.send :initialize, $stdout.fileno, 'w' }.should_not raise_error(TypeError)
+  after :each do
+    @io.close unless @io.closed?
+    rm_r @name
   end
 
-  it "succeeds when fd responds to #to_int" do
+  it "reassociates the IO instance with the new descriptor when passed a Fixnum" do
+    # This leaks one file descriptor. Do NOT write this spec to
+    # call IO.new with the fd of an existing IO instance.
+    fd = new_fd @name, "r:utf-8"
+    @io.send :initialize, fd, 'r'
+    @io.fileno.should == fd
+  end
+
+  it "calls #to_int to coerce the object passed as an fd" do
+    # This leaks one file descriptor. Do NOT write this spec to
+    # call IO.new with the fd of an existing IO instance.
     obj = mock('fileno')
-    def obj.to_int() $stdout.fileno end
+    fd = new_fd @name, "r:utf-8"
+    obj.should_receive(:to_int).and_return(fd)
+    @io.send :initialize, obj, 'r'
+    @io.fileno.should == fd
+  end
 
-    lambda { @io.send :initialize, obj, 'w' }.should_not raise_error(TypeError)
+  it "raises a TypeError when passed an IO" do
+    lambda { @io.send :initialize, STDOUT, 'w' }.should raise_error(TypeError)
   end
 
-  it "raises a TypeError when fd is an IO" do
-    lambda { @io.send :initialize, $stdout, 'w' }.should raise_error(TypeError)
+  it "raises a TypeError when passed nil" do
+    lambda { @io.send :initialize, nil, 'w' }.should raise_error(TypeError)
   end
 
-  it "raises a TypeError when given a non-integer" do
-    lambda { @io.send :initialize, @fname, 'w' }.should raise_error(TypeError)
+  it "raises a TypeError when passed a String" do
+    lambda { @io.send :initialize, "4", 'w' }.should raise_error(TypeError)
   end
-  
+
   it "raises IOError on closed stream" do
-    lambda { @io.send :initialize, IOSpecs.closed_file.fileno }.should raise_error(IOError)
+    lambda { @io.send :initialize, IOSpecs.closed_io.fileno }.should raise_error(IOError)
   end
 
   it "raises an Errno::EBADF when given an invalid file descriptor" do
     lambda { @io.send :initialize, -1, 'w' }.should raise_error(Errno::EBADF)
   end
-  
-  ruby_version_is '1.9' do
-    it "uses the external encoding specified in the mode argument" do
-      io = IO.new(2, 'w:UTF-8')
-      io.external_encoding.to_s.should == 'UTF-8'
-    end
-
-    it "uses the external and the internal encoding specified in the mode argument" do
-      io = IO.new(2, 'w:UTF-8:iso-8859-1')
-      io.external_encoding.to_s.should == 'UTF-8'
-      io.internal_encoding.to_s.should == 'ISO-8859-1'
-    end
-
-    it "uses the external encoding specified via the :external_encoding option" do
-      io = IO.new(2, 'w', {:external_encoding => 'UTF-8'})
-      io.external_encoding.to_s.should == 'UTF-8'
-    end
-
-    it "uses the internal encoding specified via the :internal_encoding option" do
-      io = IO.new(2, 'w', {:internal_encoding => 'ISO-8859-1'})
-      io.internal_encoding.to_s.should == 'ISO-8859-1'
-    end
-
-    it "uses the colon-separated encodings specified via the :encoding option" do
-      io = IO.new(2, 'w', {:encoding => 'UTF-8:iso-8859-1'})
-      io.external_encoding.to_s.should == 'UTF-8'
-      io.internal_encoding.to_s.should == 'ISO-8859-1'
-    end
-
-    it "ingores the :encoding option when the :external_encoding option is present" do
-      io = IO.new(2, 'w', {:external_encoding => 'UTF-8', :encoding => 'iso-8859-1:iso-8859-1'})
-      io.external_encoding.to_s.should == 'UTF-8'
-    end
-    
-    it "ingores the :encoding option when the :internal_encoding option is present" do
-      io = IO.new(2, 'w', {:internal_encoding => 'ISO-8859-1', :encoding => 'iso-8859-1:iso-8859-1'})
-      io.internal_encoding.to_s.should == 'ISO-8859-1'
-    end
-
-    it "uses the encoding specified via the :mode option hash" do
-      io = IO.new(2, {:mode => 'w:UTF-8:iso-8859-1'})
-      io.external_encoding.to_s.should == 'UTF-8'
-      io.internal_encoding.to_s.should == 'ISO-8859-1'
-    end
-    
-    it "ignores the :internal_encoding option when the same as the external encoding" do
-      io = IO.new(2, 'w', {:external_encoding => 'utf-8', :internal_encoding => 'utf-8'})
-      io.external_encoding.to_s.should == 'UTF-8'
-      io.internal_encoding.to_s.should == ''
-    end
-  end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/inspect_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/inspect_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/inspect_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -2,21 +2,7 @@
 require File.expand_path('../fixtures/classes', __FILE__)
 
 describe "IO#inspect" do
-  before :each do
-    @file = File.open(tmp("inspect_spec"), "w") 
+  it "returns a String describing a stream" do
+    STDOUT.inspect.should be_kind_of(String)
   end
-
-  after :each do
-    @file.close if !@file.closed?
-    File.unlink(tmp("inspect_spec"))
-  end
-
-  it "returns a string describing a stream" do
-    # don't hardcode the tmp path 
-    @file.inspect.should =~ /#<File.*inspect_spec>/
-    io = IO.new(@file.to_i)
-    io.inspect.should =~ /<IO:[\w\s?\d]+>/
-    io.close
-    lambda { @file.close }.should raise_error(Errno::EBADF)
-  end
 end

Added: MacRuby/trunk/spec/frozen/core/io/internal_encoding_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/internal_encoding_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/internal_encoding_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO#internal_encoding" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/ioctl_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/ioctl_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/ioctl_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,6 +3,6 @@
 
 describe "IO#ioctl" do
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.ioctl(5, 5) }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.ioctl(5, 5) }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/lineno_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/lineno_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/lineno_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -11,7 +11,7 @@
   end
 
   it "raises an IOError on a closed stream" do
-    lambda { IOSpecs.closed_file.lineno }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.lineno }.should raise_error(IOError)
   end
 
   it "returns the current line number" do
@@ -37,7 +37,7 @@
   end
 
   it "raises an IOError on a closed stream" do
-    lambda { IOSpecs.closed_file.lineno = 5 }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.lineno = 5 }.should raise_error(IOError)
   end
 
   it "calls #to_int on a non-numeric argument" do

Modified: MacRuby/trunk/spec/frozen/core/io/lines_spec_disabled.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/lines_spec_disabled.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/lines_spec_disabled.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -13,8 +13,7 @@
     end
 
     it "returns an Enumerator" do
-      enum = @io.lines
-      enum.instance_of?(enumerator_class).should be_true
+      @io.lines.should be_an_instance_of(enumerator_class)
     end
 
     it "returns a line when accessed" do
@@ -22,8 +21,18 @@
       enum.first.should == IOSpecs.lines[0]
     end
 
-    it "ignores a given block" do
-      @io.lines{ raise "oups" }.should be_an_instance_of(enumerator_class)
+    ruby_version_is ''...'1.9' do
+      it "ignores a given block" do
+        @io.lines{ raise "oups" }.should be_an_instance_of(enumerator_class)
+      end
     end
+
+    ruby_version_is '1.9' do
+      it "yields each line to the passed block" do
+        ScratchPad.record []
+        @io.lines { |s| ScratchPad << s }
+        ScratchPad.recorded.should == IOSpecs.lines
+      end
+    end
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/new_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/new_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/new_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "IO.new" do
   it_behaves_like :io_new, :new
 end
+
+describe "IO.new" do
+  it_behaves_like :io_new_errors, :new
+end

Modified: MacRuby/trunk/spec/frozen/core/io/open_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/open_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/open_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,53 +1,63 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
 require File.expand_path('../shared/new', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
 
 describe "IO.open" do
   it_behaves_like :io_new, :open
 end
 
 describe "IO.open" do
-  before :all do
-    @file_name = fixture __FILE__, "lines.txt"
+  it_behaves_like :io_new_errors, :open
+end
+
+# These specs use a special mock helper to avoid mock
+# methods from preventing IO#close from running and
+# which would prevent the file referenced by @fd from
+# being deleted on Windows.
+
+describe "IO.open" do
+  before :each do
+    @name = tmp("io_open.txt")
+    @fd = new_fd @name
+    ScratchPad.clear
   end
 
-  it "raises an IOError on closed stream" do
-    lambda { IO.open(IOSpecs.closed_file.fileno, 'w') }.should raise_error(IOError)
+  after :each do
+    rm_r @name
   end
 
-  it "with a block invokes close on opened IO object when exiting the block" do
-    File.open(@file_name, 'r') do |f|
-      io = IO.open(f.fileno, 'r') do |io|
-        class << io
-          @res = "close was not invoked"
-          alias_method(:close_orig, :close)
-          def close; close_orig; @res = "close was invoked"; end
-          def to_s;  @res; end
-        end
-        io
+  it "calls #close after yielding to the block" do
+    IO.open(@fd, "w") do |io|
+      IOSpecs.io_mock(io, :close) do
+        super()
+        ScratchPad.record :called
       end
-      io.to_s.should == "close was invoked"
+      io.closed?.should be_false
     end
+    ScratchPad.recorded.should == :called
   end
 
-  it "with a block propagates non-StandardErrors produced by close" do
-    lambda {
-      File.open @file_name do |f|
-        IO.open f.fileno do |io|
-          def io.close
-            raise Exception, "exception out of close"
-          end
+  it "propagates an exception raised by #close that is not a StandardError" do
+    lambda do
+      IO.open(@fd, "w") do |io|
+        IOSpecs.io_mock(io, :close) do
+          super()
+          ScratchPad.record :called
+          raise Exception
         end
-      end # IO object is closed here
-    }.should raise_error(Exception)
+      end
+    end.should raise_error(Exception)
+    ScratchPad.recorded.should == :called
   end
 
-  it "with a block swallows StandardErrors produced by close" do
-    # This closes the file descriptor twice, the second raises Errno::EBADF
-    lambda {
-      File.open @file_name do |f|
-        IO.open f.fileno do end
+  it "does not propagate a StandardError raised by #close" do
+    IO.open(@fd, "w") do |io|
+      IOSpecs.io_mock(io, :close) do
+        super()
+        ScratchPad.record :called
+        raise StandardError
       end
-    }.should_not raise_error
+    end
+    ScratchPad.recorded.should == :called
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/output_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/output_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/output_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -15,7 +15,7 @@
    end
 
   it "raises an error if the stream is closed" do
-    io = IOSpecs.closed_file
+    io = IOSpecs.closed_io
     lambda { io << "test" }.should raise_error(IOError)
   end
 

Modified: MacRuby/trunk/spec/frozen/core/io/pid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/pid_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/pid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,4 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes.rb', __FILE__)
 
 describe "IO#pid" do
   before :each do

Modified: MacRuby/trunk/spec/frozen/core/io/popen_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/popen_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/popen_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -56,3 +56,7 @@
   #end
 end
 
+
+describe "IO.popen" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/io/print_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/print_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/print_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -48,7 +48,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.print("stuff") }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.print("stuff") }.should raise_error(IOError)
   end
 end
 

Modified: MacRuby/trunk/spec/frozen/core/io/printf_spec_disabled.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/printf_spec_disabled.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/printf_spec_disabled.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,16 +3,22 @@
 
 describe "IO#printf" do
   before :each do
-    @io = IO.new STDOUT.fileno, 'w'
+    @name = tmp("io_printf.txt")
+    @io = new_io @name
+    @io.sync = true
   end
 
-  it "writes the #sprintf formatted string to the file descriptor" do
-    lambda {
-      @io.printf "%s\n", "look ma, no hands"
-    }.should output_to_fd("look ma, no hands\n", @io)
+  after :each do
+    @io.close unless @io.closed?
+    rm_r @name
   end
 
+  it "writes the #sprintf formatted string" do
+    @io.printf "%d %s", 5, "cookies"
+    @name.should have_data("5 cookies")
+  end
+
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.printf("stuff") }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.printf("stuff") }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/putc_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/putc_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/putc_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -15,7 +15,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.putc('a') }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.putc('a') }.should raise_error(IOError)
   end
 
   it "writes the first byte of a String" do

Modified: MacRuby/trunk/spec/frozen/core/io/puts_spec_disabled.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/puts_spec_disabled.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/puts_spec_disabled.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -6,10 +6,16 @@
 # or write calls. Also, these tests do not make sure the ordering of the write calls
 # are correct.
 describe "IO#puts" do
-  before(:each) do
-    @io = IO.new(2, 'w')
+  before :each do
+    @name = tmp("io_puts.txt")
+    @io = new_io @name
   end
 
+  after :each do
+    @io.close unless @io.closed?
+    rm_r @name
+  end
+
   it "writes just a newline when given no args" do
     @io.should_receive(:write).with("\n")
     @io.puts.should == nil
@@ -38,12 +44,12 @@
   it "calls to_s before writing non-string objects" do
     object = mock('hola')
     object.should_receive(:to_s).and_return("hola")
-    
+
     @io.should_receive(:write).with("hola")
     @io.should_receive(:write).with("\n")
     @io.puts(object).should == nil
   end
-  
+
   it "writes each arg if given several" do
     @io.should_receive(:write).with("1")
     @io.should_receive(:write).with("two")
@@ -51,7 +57,7 @@
     @io.should_receive(:write).with("\n").exactly(3).times
     @io.puts(1, "two", 3).should == nil
   end
-  
+
   it "flattens a nested array before writing it" do
     @io.should_receive(:write).with("1")
     @io.should_receive(:write).with("2")
@@ -65,7 +71,7 @@
     @io.should_receive(:write).exactly(0).times
     @io.puts(x).should == nil
   end
-  
+
   it "writes [...] for a recursive array arg" do
     x = []
     x << 2 << x
@@ -74,7 +80,7 @@
     @io.should_receive(:write).with("\n").exactly(2).times
     @io.puts(x).should == nil
   end
-  
+
   it "writes a newline after objects that do not end in newlines" do
     @io.should_receive(:write).with("5")
     @io.should_receive(:write).with("\n")
@@ -85,7 +91,7 @@
     @io.should_receive(:write).with("5\n")
     @io.puts("5\n").should == nil
   end
-  
+
   it "ignores the $/ separator global" do
     $/ = ":"
     @io.should_receive(:write).with("5")
@@ -93,8 +99,8 @@
     @io.puts(5).should == nil
     $/ = "\n"
   end
-  
+
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.puts("stuff") }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.puts("stuff") }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/read_nonblock_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/read_nonblock_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/read_nonblock_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -44,7 +44,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.read_nonblock(5) }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.read_nonblock(5) }.should raise_error(IOError)
   end
 
   it "raises EOFError when the end is reached" do

Modified: MacRuby/trunk/spec/frozen/core/io/read_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/read_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/read_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -202,7 +202,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.read }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.read }.should raise_error(IOError)
   end
 end
 

Added: MacRuby/trunk/spec/frozen/core/io/readbyte_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/readbyte_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/readbyte_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO#readbyte" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/readchar_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/readchar_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/readchar_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -38,7 +38,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.readchar }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.readchar }.should raise_error(IOError)
   end
 end
 

Modified: MacRuby/trunk/spec/frozen/core/io/readline_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/readline_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/readline_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -33,7 +33,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.readline }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.readline }.should raise_error(IOError)
   end
 
   it "assigns the returned line to $_" do

Modified: MacRuby/trunk/spec/frozen/core/io/readpartial_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/readpartial_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/readpartial_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -14,7 +14,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.readpartial(10) }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.readpartial(10) }.should raise_error(IOError)
 
     @rd.close
     lambda { @rd.readpartial(10) }.should raise_error(IOError)

Modified: MacRuby/trunk/spec/frozen/core/io/reopen_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/reopen_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/reopen_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,154 +3,199 @@
 
 describe "IO#reopen" do
   before :each do
-    # for reading
-    @name2 = fixture __FILE__,  "numbered_lines.txt"
-    @file1 = IOSpecs.io_fixture "lines.txt"
-    @file2 = IOSpecs.io_fixture @name2
+    @name = tmp("io_reopen.txt")
+    @other_name = tmp("io_reopen_other.txt")
 
-    # for writing
-    @name1_w = tmp("IO_reopen_file1") + $$.to_s
-    @name2_w = tmp("IO_reopen_file2") + $$.to_s
-    @file1_w = File.new(@name1_w, "w+")
-    @file2_w = File.new(@name2_w, "w+")
+    @io = new_io @name
+    @other_io = File.open @other_name, "w"
   end
 
   after :each do
-    @file1.close unless @file1.closed?
-    @file2.close unless @file2.closed?
-    @file1_w.close unless @file1_w.closed?
-    @file2_w.close unless @file2_w.closed?
-    rm_r @name1_w, @name2_w
+    @io.close unless @io.closed?
+    @other_io.close unless @other_io.closed?
+    rm_r @name, @other_name
   end
 
-  it "raises IOError on closed stream" do
-    lambda { @file1.reopen(IOSpecs.closed_file) }.should raise_error(IOError)
+  it "calls #to_io to convert an object" do
+    obj = mock("io")
+    obj.should_receive(:to_io).and_return(@other_io)
+    @io.reopen obj
   end
 
-  it "raises IOError when called on closed stream" do
-    @file1.close
-    lambda { @file1.reopen(@file2) }.should raise_error(IOError)
+  it "changes the class of the instance to the class of the object returned by #to_io" do
+    obj = mock("io")
+    obj.should_receive(:to_io).and_return(@other_io)
+    @io.reopen(obj).should be_an_instance_of(File)
   end
 
-  it "should not raise IOError when called on closed stream with path" do
-    @file1.close
-    lambda do
-      @file1.reopen(@name2, "r")
-    end.should_not raise_error(IOError)
+  it "raises an IOError if the object returned by #to_io is closed" do
+    obj = mock("io")
+    obj.should_receive(:to_io).and_return(IOSpecs.closed_io)
+    lambda { @io.reopen obj }.should raise_error(IOError)
+  end
 
-    @file1.closed?.should be_false
-    @file1.gets.should == "Line 1: One\n"
+  it "raises an TypeError if #to_io does not return an IO instance" do
+    obj = mock("io")
+    obj.should_receive(:to_io).and_return("something else")
+    lambda { @io.reopen obj }.should raise_error(TypeError)
   end
 
-  it "reassociates self to another file/descriptor but returns self" do
-    @file1.reopen(@file2).should == @file1
-    @file2.reopen(@file1).should == @file2
-    @file1.reopen(@name2).should == @file1
-    @file2.reopen(@name2).should == @file2
+  it "raises an IOError when called on a closed stream with an object" do
+    @io.close
+    obj = mock("io")
+    obj.should_not_receive(:to_io)
+    lambda { @io.reopen(STDOUT) }.should raise_error(IOError)
   end
-  
-  it "reassociates self with a new stream opened on path, when self in initial state" do
-    @file1.reopen(@name2)
-    @file1.gets.should == "Line 1: One\n"
+
+  it "raises an IOError if the IO argument is closed" do
+    lambda { @io.reopen(IOSpecs.closed_io) }.should raise_error(IOError)
   end
 
-  it "reassociates self with a new stream opened on path, after some reads" do
-    # reade some first
-    4.times {@file1.gets; @file2.gets}
+  it "raises an IOError when called on a closed stream with an IO" do
+    @io.close
+    lambda { @io.reopen(STDOUT) }.should raise_error(IOError)
+  end
+end
 
-    @file1.reopen(@name2)
-    @file1.gets.should == "Line 1: One\n"
+describe "IO#reopen with a String" do
+  before :each do
+    @name = fixture __FILE__, "numbered_lines.txt"
+    @other_name = tmp("io_reopen.txt")
+    touch @other_name
+    @io = IOSpecs.io_fixture "lines.txt"
   end
 
-  it "reassociates self with a new stream opened on path, after some writes" do
-    @file1_w.puts("line1-F1")
-    @file2_w.puts("line1-F2")
-    @file2_w.reopen(@name1_w)
-    @file1_w.puts("line2-F1")
-    @file2_w.puts("line2-F2")
-    @file1_w.close
-    @file2_w.close
-    File.readlines(@name1_w).should == ["line2-F2\n", "line2-F1\n"]
-    File.readlines(@name2_w).should == ["line1-F2\n"]
+  after :each do
+    @io.close unless @io.closed?
+    rm_r @other_name
   end
 
-  # JRUBY-2071: File#reopen blows with IllegalArgumentException in some cases
-  it "reassociates self with the I/O stream specified as an argument, after some reads" do
-    length = 12 # length of first lines in numbered_lines.txt
+  it "does not raise an exception when called on a closed stream with a path" do
+    @io.close
+    @io.reopen @name, "r"
+    @io.closed?.should be_false
+    @io.gets.should == "Line 1: One\n"
+  end
 
-    # read some first
-    @file1.gets
-    @file2.gets
+  it "returns self" do
+    @io.reopen(@name).should equal(@io)
+  end
 
-    pos = @file2.pos
-    @file1.reopen(@file2)
-    @file1.pos.should == pos
+  it "positions a newly created instance at the beginning of the new stream" do
+    @io.reopen(@name)
+    @io.gets.should == "Line 1: One\n"
+  end
 
-    # MRI behavior: after reopen the buffers are not corrected,
-    # so we need the following line, or next gets wourd return nil.
-    @file1.pos = pos
+  it "positions an instance that has been read from at the beginning of the new stream" do
+    @io.gets
+    @io.reopen(@name)
+    @io.gets.should == "Line 1: One\n"
+  end
 
-    @file1.gets.should == "Line 2: Two\n"
+  ruby_version_is "1.9" do
+    it "calls #to_path on non-String arguments" do
+      obj = mock('path')
+      obj.should_receive(:to_path).and_return(@other_name)
+      @io.reopen(obj)
+    end
   end
+end
 
-  platform_is_not :darwin, :freebsd do
-    it "reassociates self with the I/O stream specified as an argument, after some sysreads" do
-      length = 12 # length of first lines in numbered_lines.txt
+describe "IO#reopen with a String" do
+  before :each do
+    @name = tmp("io_reopen.txt")
+    @other_name = tmp("io_reopen_other.txt")
 
-      # reade some first
-      @file1.sysread(length)
-      @file2.sysread(length)
+    @io = new_io @name, "w"
+  end
 
-      @file1.reopen(@file2)
-      @file1.sysread(length).should == "Line 2: Two\n"
+  after :each do
+    @io.close unless @io.closed?
+    rm_r @name, @other_name
+  end
+
+  it "opens a path after writing to the original file descriptor" do
+    @io.print "original data"
+    @io.reopen @other_name, "w"
+    @io.print "new data"
+    @io.flush
+
+    @name.should have_data("original data")
+    @other_name.should have_data("new data")
+  end
+end
+
+describe "IO#reopen with an IO" do
+  before :each do
+    @name = tmp("io_reopen.txt")
+    @other_name = tmp("io_reopen_other.txt")
+    touch(@other_name) do |f|
+      f.puts "Line 1"
+      f.puts "Line 2"
     end
+
+    @io = new_io @name
+    @other_io = new_io @other_name, "r"
   end
 
-  it "reassociates self with the I/O stream specified as an argument, after some writes" do
-    @file1_w.puts("line1-F1")
-    @file2_w.puts("line1-F2")
-    @file2_w.reopen(@file1_w)
-    @file1_w.puts("line2-F1")
-    @file2_w.puts("line2-F2")
-    @file1_w.close
-    @file2_w.close
-    File.readlines(@name1_w).should == ["line1-F1\n", "line2-F1\n", "line2-F2\n"]
-    File.readlines(@name2_w).should == ["line1-F2\n"]
+  after :each do
+    @io.close unless @io.closed?
+    @other_io.close unless @other_io.closed?
+    rm_r @name, @other_name
   end
 
-  it "reassociates self with a new stream after some reads from self" do
-    @file1.reopen(@file2)
-    @file1.gets
-    @file1.gets
-    @file2.close
-    @file2 = IOSpecs.io_fixture @name2
-    @file1.reopen(@file2).gets.should == "Line 1: One\n"
+  it "does not call #to_io" do
+    # Why do we not use #should_not_receive(:to_io) here? Because
+    # MRI actually changes the class of @io in the call to #reopen
+    # but does not preserve the existing singleton class of @io.
+    def @io.to_io; flunk; end
+    @io.reopen(@other_io).should be_an_instance_of(IO)
   end
 
-  it "reassociates self with a new stream after some reads from the stream" do
-    @file2.gets
-    @file2.gets
-    @file1.reopen(@file2).gets.should == "Line 3: Three\n"
+  it "does not change the object_id" do
+    obj_id = @io.object_id
+    @io.reopen @other_io
+    @io.object_id.should == obj_id
   end
 
-  quarantine! do
-    # Access to multiple IOs that share the same fd or duplicated fd may cause
-    # bizarre behavior (see [ruby-core:28281], [ruby-core:28327]).
-    # This is inherent result of buffering.  It will not be fixed because
-    # buffering is important for performance.
-    it "reassociates self with a new stream after some reads" do
-      @file1.reopen(@file2)
-      @file1.gets
-      @file1.gets
-      @file1.reopen(@file2).gets.should == "unknown\n"
-    end
+  it "reads from the beginning if the other IO has not been read from" do
+    @io.reopen @other_io
+    @io.gets.should == "Line 1\n"
   end
 
-  ruby_version_is "1.9" do
-    it "calls #to_path on non-String arguments" do
-      p = mock('path')
-      p.should_receive(:to_path).and_return(@file2.to_path)
-      @file1.reopen(p)
-    end
+  it "reads from the current position of the other IO's stream" do
+    @other_io.gets.should == "Line 1\n"
+    @io.reopen @other_io
+    @io.gets.should == "Line 2\n"
   end
 end
+
+describe "IO#reopen with an IO" do
+  before :each do
+    @name = tmp("io_reopen.txt")
+    @other_name = tmp("io_reopen_other.txt")
+
+    @io = new_io @name
+    @other_io = File.open @other_name, "w"
+  end
+
+  after :each do
+    @io.close unless @io.closed?
+    @other_io.close unless @other_io.closed?
+    rm_r @name, @other_name
+  end
+
+  it "associates the IO instance with the other IO's stream" do
+    @other_name.should have_data("")
+    @io.reopen @other_io
+    @io.print "io data"
+    @io.flush
+    @name.should have_data("")
+    @other_name.should have_data("io data")
+  end
+
+  it "may change the class of the instance" do
+    @io.reopen @other_io
+    @io.should be_an_instance_of(File)
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/rewind_spec_disabled.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/rewind_spec_disabled.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/rewind_spec_disabled.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -33,6 +33,6 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.rewind }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.rewind }.should raise_error(IOError)
   end
 end

Added: MacRuby/trunk/spec/frozen/core/io/set_encoding_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/set_encoding_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/set_encoding_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO#set_encoding" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/io/shared/codepoints.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/shared/codepoints.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/shared/codepoints.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -39,6 +39,6 @@
   end
 
   it "raises an IOError when self is not readable" do
-    lambda { IOSpecs.closed_file.send(@method).to_a }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.send(@method).to_a }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/shared/each.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/shared/each.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/shared/each.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -41,7 +41,7 @@
       # method must have a block in order to raise the IOError.
       # MRI 1.8.7 returns enumerator if block is not provided.
       # See [ruby-core:16557].
-      lambda { IOSpecs.closed_file.send(@method){} }.should raise_error(IOError)
+      lambda { IOSpecs.closed_io.send(@method){} }.should raise_error(IOError)
     end
 
     ruby_version_is "" ... "1.8.7" do

Modified: MacRuby/trunk/spec/frozen/core/io/shared/new.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/shared/new.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/shared/new.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,120 +1,104 @@
 require File.expand_path('../../fixtures/classes', __FILE__)
 
+# This group of specs may ONLY contain specs that do successfully create
+# an IO instance from the file descriptor returned by #new_fd helper.
 describe :io_new, :shared => true do
-  before :all do
-    @filename = tmp("rubinius-spec-io-new-#{$$}.txt")
+  before :each do
+    @name = tmp("io_new.txt")
+    @fd = new_fd @name
   end
 
-  after :all do
-    File.unlink @filename
+  after :each do
+    @io.close if @io and !@io.closed?
+    rm_r @name
   end
 
-  before :each do
-    @file = File.open @filename, "w"
+  it "creates an IO instance from a Fixnum argument" do
+    @io = IO.send(@method, @fd, "w")
+    @io.should be_an_instance_of(IO)
   end
 
-  after :each do
-    @file.close unless @file.closed? rescue Errno::EBADF
+  it "calls #to_int on an object to convert to a Fixnum" do
+    obj = mock("file descriptor")
+    obj.should_receive(:to_int).and_return(@fd)
+    @io = IO.send(@method, obj, "w")
+    @io.should be_an_instance_of(IO)
   end
 
-  it "returns a new IO object" do
-    begin
-      io = IO.send(@method, @file.fileno, 'w')
-    ensure
-      io.close
+  ruby_version_is "1.9" do
+    it "uses the external encoding specified in the mode argument" do
+      @io = IO.send(@method, @fd, 'w:utf-8')
+      @io.external_encoding.to_s.should == 'UTF-8'
     end
-    io.should be_an_instance_of(IO)
-  end
 
-  it "takes an Integer or #to_int argument as the descriptor to open" do
-    o = mock('descriptor')
-    o.should_receive(:to_int).any_number_of_times.and_return(@file.fileno)
+    it "uses the external and the internal encoding specified in the mode argument" do
+      @io = IO.send(@method, @fd, 'w:utf-8:ISO-8859-1')
+      @io.external_encoding.to_s.should == 'UTF-8'
+      @io.internal_encoding.to_s.should == 'ISO-8859-1'
+    end
 
-    begin
-      io = IO.send(@method, @file.fileno, 'w')
-      io.fileno.should == @file.fileno
+    it "uses the external encoding specified via the :external_encoding option" do
+      @io = IO.send(@method, @fd, 'w', {:external_encoding => 'utf-8'})
+      @io.external_encoding.to_s.should == 'UTF-8'
+    end
 
-      io2 = IO.send(@method, o, 'w')
-      io2.fileno.should == @file.fileno
-    ensure
-      io.close unless io.closed? rescue Errno::EBADF
-      io2.close unless io2.closed? rescue Errno::EBADF
+    it "uses the internal encoding specified via the :internal_encoding option" do
+      @io = IO.send(@method, @fd, 'w', {:internal_encoding => 'iso-8859-1'})
+      @io.internal_encoding.to_s.should == 'ISO-8859-1'
     end
-  end
 
-  it "associates new IO with the old descriptor so each IO directly affects the other" do
-    io = IO.send @method, @file.fileno, 'w'
+    it "uses the colon-separated encodings specified via the :encoding option" do
+      @io = IO.send(@method, @fd, 'w', {:encoding => 'utf-8:ISO-8859-1'})
+      @io.external_encoding.to_s.should == 'UTF-8'
+      @io.internal_encoding.to_s.should == 'ISO-8859-1'
+    end
 
-    @file.syswrite "Hello "
-    @file.closed?.should == false
+    it "ingores the :encoding option when the :external_encoding option is present" do
+      @io = IO.send(@method, @fd, 'w', {:external_encoding => 'utf-8', :encoding => 'iso-8859-1:iso-8859-1'})
+      @io.external_encoding.to_s.should == 'UTF-8'
+    end
 
-    io.close
-    io.closed?.should == true
+    it "ingores the :encoding option when the :internal_encoding option is present" do
+      @io = IO.send(@method, @fd, 'w', {:internal_encoding => 'iso-8859-1', :encoding => 'iso-8859-1:iso-8859-1'})
+      @io.internal_encoding.to_s.should == 'ISO-8859-1'
+    end
 
-    # Using #syswrite to force no Ruby buffering which could mask this error
-    lambda { @file.syswrite "there\n" }.should raise_error(Errno::EBADF)
-  end
+    it "uses the encoding specified via the :mode option hash" do
+      @io = IO.send(@method, @fd, {:mode => 'w:utf-8:ISO-8859-1'})
+      @io.external_encoding.to_s.should == 'UTF-8'
+      @io.internal_encoding.to_s.should == 'ISO-8859-1'
+    end
 
-  it "raises TypeError if not given an Integer or #to_int" do
-    lambda { IO.send(@method, nil, 'r') }.should raise_error(TypeError)
-    lambda { IO.send(@method, Object.new, 'r') }.should raise_error(TypeError)
+    it "ignores the :internal_encoding option when the same as the external encoding" do
+      @io = IO.send(@method, @fd, 'w', {:external_encoding => 'utf-8', :internal_encoding => 'utf-8'})
+      @io.external_encoding.to_s.should == 'UTF-8'
+      @io.internal_encoding.to_s.should == ''
+    end
   end
+end
 
-  it "raises ArgumentError if not given any arguments" do
-    lambda { IO.send(@method, IO.new) }.should raise_error(ArgumentError)
+# This group of specs may ONLY contain specs that do not actually create
+# an IO instance from the file descriptor returned by #new_fd helper.
+describe :io_new_errors, :shared => true do
+  before :each do
+    @name = tmp("io_new.txt")
+    @fd = new_fd @name
   end
 
-  it "raises EBADF if the file descriptor given is not a valid and open one" do
-    lambda { IO.send(@method, -2, 'r') }.should raise_error(Errno::EBADF)
-
-    fd = @file.fileno
-    @file.close
-    lambda { IO.send(@method, fd, 'w') }.should raise_error(Errno::EBADF)
+  after :each do
+    IO.new(@fd, "w").close
+    rm_r @name
   end
 
-  # (1.9 behaviour verified as correct in bug #1582)
-  it "raises EINVAL if mode is not compatible with the descriptor's current mode" do
-    lambda { IO.send(@method, @file.fileno, 'r') }.
-      should raise_error(Errno::EINVAL)
-    lambda { io = IO.send(@method, @file.fileno, 'w'); io.close }.
-      should_not raise_error
+  it "raises an Errno::EBADF if the file descriptor is not valid" do
+    lambda { IO.send(@method, -1, "w") }.should raise_error(Errno::EBADF)
   end
 
-  it "raises IOError on closed stream" do
-    lambda { IO.new(IOSpecs.closed_file.fileno, 'w') }.should raise_error(IOError)
+  it "raises an IOError if passed a closed stream" do
+    lambda { IO.send(@method, IOSpecs.closed_io.fileno, 'w') }.should raise_error(IOError)
   end
 
-  it "does not close the stream automatically if given a block" do
-    begin
-      io = IO.new(@file.fileno, 'w') {|f| puts f.read }
-      io.closed?.should == false
-      @file.closed?.should == false
-    ensure
-      io.close
-    end
+  it "raises an Errno::EINVAL if the new mode is not compatible with the descriptor's current mode" do
+    lambda { IO.send(@method, @fd, "r") }.should raise_error(Errno::EINVAL)
   end
-
-  it "emits a warning if given a block" do
-    lambda {
-      io = IO.new(@file.fileno, 'w') {|io| puts io.read }
-      io.close
-    }.should complain(/IO::new.*does not take block.*IO::open.*instead/)
-  end
-
-  it "accepts only one argument" do
-    # By default, IO.new without an arg assumes RO
-    @file.close
-    io = ""
-    @file = File.open @filename, 'r'
-    lambda {
-      io = IO.new(@file.fileno)
-    }.should_not raise_error()
-
-    io.close
-  end
-
-  # (1.9 behaviour verified as correct in bug #1582)
-  it "cannot open an IO with incompatible flags" do
-    lambda { IO.new(@file.fileno, "r") }.should raise_error(Errno::EINVAL)
-  end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/shared/pos.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/shared/pos.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/shared/pos.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -19,7 +19,7 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.send(@method) }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.send(@method) }.should raise_error(IOError)
   end
 
   it "resets #eof?" do
@@ -67,6 +67,6 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.send @method, 0 }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.send @method, 0 }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/shared/tty.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/shared/tty.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/shared/tty.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -13,6 +13,6 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.send @method }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.send @method }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/shared/write.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/shared/write.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/shared/write.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -65,6 +65,6 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.send(@method, "hello") }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.send(@method, "hello") }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/stat_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/stat_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/stat_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,11 +3,10 @@
 
 describe "IO#stat" do
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.stat }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.stat }.should raise_error(IOError)
   end
 
   it "returns a File::Stat object for the stream" do
-    io = IO.new $stderr.fileno
-    io.stat.should be_an_instance_of(File::Stat)
+    STDOUT.stat.should be_an_instance_of(File::Stat)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/sync_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/sync_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/sync_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -27,7 +27,7 @@
   end
 
   it "raises an IOError on closed stream" do
-    lambda { IOSpecs.closed_file.sync = true }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.sync = true }.should raise_error(IOError)
   end
 end
 
@@ -45,6 +45,6 @@
   end
 
   it "raises an IOError on closed stream" do
-    lambda { IOSpecs.closed_file.sync }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.sync }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/sysread_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/sysread_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/sysread_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -86,6 +86,6 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.sysread(5) }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.sysread(5) }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/to_i_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/to_i_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/to_i_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -7,6 +7,6 @@
   end
 
   it "raises IOError on closed stream" do
-    lambda { IOSpecs.closed_file.to_i }.should raise_error(IOError)
+    lambda { IOSpecs.closed_io.to_i }.should raise_error(IOError)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/to_io_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/to_io_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/to_io_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -15,7 +15,7 @@
   end
 
   it "returns self for closed stream" do
-    io = IOSpecs.closed_file
+    io = IOSpecs.closed_io
     io.to_io.should equal(io)
   end
 end

Modified: MacRuby/trunk/spec/frozen/core/io/try_convert_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/try_convert_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/io/try_convert_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,34 +3,45 @@
 
 describe "IO.try_convert" do
   ruby_version_is "1.8.8" do
-    it "returns self for IO objects" do
-      fd_1 = IO.new(1)
-      IO.try_convert(fd_1).should equal(fd_1)
+    before :each do
+      @name = tmp("io_try_convert.txt")
+      @io = new_io @name
     end
-    
-    it "converts using :to_io" do
-      io = File.new(__FILE__)
-      obj = mock('ioish')
-      obj.should_receive(:to_io).and_return(io)
-      IO.try_convert(obj).should equal(io)
+
+    after :each do
+      @io.close unless @io.closed?
+      rm_r @name
     end
-    
-    it "returns nil when the argument doesn't respond to :to_io" do
-      IO.try_convert(-1).should be_nil
+
+    it "returns the passed IO object" do
+      IO.try_convert(@io).should equal(@io)
     end
-    
-    it "should not rescue errors" do
-      lambda{
-        IO.try_convert(IOSpecs::NotConvertible.new)
-      }.should raise_error
+
+    it "does not call #to_io on an IO instance" do
+      @io.should_not_receive(:to_io)
+      IO.try_convert(@io)
     end
-    
-    it "checks the result of the conversion" do
-      obj = mock('middle child')
-      obj.should_receive(:to_io).and_return(:confused)
-      lambda{
-        IO.try_convert(obj)
-      }.should raise_error(TypeError)
+
+    it "calls #to_io to coerce an object" do
+      obj = mock("io")
+      obj.should_receive(:to_io).and_return(@io)
+      IO.try_convert(obj).should equal(@io)
     end
+
+    it "returns nil when the passed object does not respond to #to_io" do
+      IO.try_convert(mock("io")).should be_nil
+    end
+
+    it "raises a TypeError if the object does not return an IO from #to_io" do
+      obj = mock("io")
+      obj.should_receive(:to_io).and_return("io")
+      lambda { IO.try_convert(obj) }.should raise_error(TypeError)
+    end
+
+    it "propagates an exception raised by #to_io" do
+      obj = mock("io")
+      obj.should_receive(:to_io).and_raise(TypeError.new)
+      lambda{ IO.try_convert(obj) }.should raise_error(TypeError)
+    end
   end
 end

Added: MacRuby/trunk/spec/frozen/core/io/ungetbyte_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/io/ungetbyte_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/io/ungetbyte_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "IO#ungetbyte" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/kernel/Array_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/Array_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/kernel/Array_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -49,3 +49,7 @@
     lambda { Array(obj) }.should raise_error(TypeError)
   end
 end
+
+describe "Kernel.Array" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/kernel/Complex_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/Complex_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/Complex_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel.Complex" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/kernel/Float_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/Float_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/kernel/Float_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -46,7 +46,7 @@
     @object.send(:Float, "10.0").should == 10.0
   end
 
-  it "raises and ArgumentError for a String of word characters" do
+  it "raises an ArgumentError for a String of word characters" do
     lambda { @object.send(:Float, "float") }.should raise_error(ArgumentError)
   end
 
@@ -54,14 +54,19 @@
     lambda { @object.send(:Float, "10.0.0") }.should raise_error(ArgumentError)
   end
 
-  it "raises and ArgumentError for a String of numbers followed by word characters" do
+  it "raises an ArgumentError for a String of numbers followed by word characters" do
     lambda { @object.send(:Float, "10D") }.should raise_error(ArgumentError)
   end
 
-  it "raises and ArgumentError for a String of word characters followed by numbers" do
+  it "raises an ArgumentError for a String of word characters followed by numbers" do
     lambda { @object.send(:Float, "D10") }.should raise_error(ArgumentError)
   end
 
+  it "is strict about the string form even across newlines" do
+    lambda { @object.send(:Float, "not a number\n10") }.should raise_error(ArgumentError)
+    lambda { @object.send(:Float, "10\nnot a number") }.should raise_error(ArgumentError)
+  end
+
   it "converts String subclasses to floats without calling #to_f" do
     my_string = Class.new(String) do
       def to_f() 1.2 end

Added: MacRuby/trunk/spec/frozen/core/kernel/Rational_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/Rational_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/Rational_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel.Rational" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/kernel/caller_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/caller_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/kernel/caller_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -148,3 +148,7 @@
     end
   end
 end
+
+describe "Kernel.caller" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/kernel/const_lookup_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/const_lookup_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/const_lookup_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel#const_lookup" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/kernel/enum_for_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/enum_for_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/enum_for_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel#enum_for" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/kernel/initialize_clone_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/initialize_clone_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/initialize_clone_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel#initialize_clone" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/kernel/initialize_dup_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/initialize_dup_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/initialize_dup_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel#initialize_dup" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/kernel/not_match_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/not_match_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/not_match_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel#!~" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/kernel/puts_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/puts_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/kernel/puts_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -2,17 +2,20 @@
 require File.expand_path('../fixtures/classes', __FILE__)
 
 describe "Kernel#puts" do
-  it "is a private method" do
-    Kernel.should have_private_instance_method(:puts)
+  before :each do
+    @stdout = $stdout
+    @name = tmp("kernel_puts.txt")
+    $stdout = new_io @name
   end
 
-  before(:each) do
-    @old_stdout = $stdout
-    $stdout = IO.new(2, 'w')
+  after :each do
+    $stdout.close
+    $stdout = @stdout
+    rm_r @name
   end
 
-  after(:each) do
-    $stdout = @old_stdout
+  it "is a private method" do
+    Kernel.should have_private_instance_method(:puts)
   end
 
   it "writes just a newline when given no args" do

Added: MacRuby/trunk/spec/frozen/core/kernel/require_relative_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/require_relative_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/require_relative_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel.require_relative" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/kernel/system_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/system_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/kernel/system_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -76,3 +76,7 @@
     result.should be_false
   end
 end
+
+describe "Kernel.system" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/kernel/to_enum_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/kernel/to_enum_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/kernel/to_enum_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Kernel#to_enum" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/marshal/load_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/marshal/load_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/marshal/load_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -392,3 +392,7 @@
   
 
 end
+
+describe "Marshal.load" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/marshal/restore_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/marshal/restore_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/marshal/restore_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "Marshal.restore" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/matchdata/hash_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/matchdata/hash_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/matchdata/hash_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "MatchData#hash" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/math/cbrt_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/math/cbrt_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/math/cbrt_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Math.cbrt" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/math/log2_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/math/log2_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/math/log2_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -29,3 +29,9 @@
     end
   end
 end
+
+ruby_version_is "1.9" do
+  describe "Math.log2" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/method/hash_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/method/hash_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/method/hash_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Method#hash" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/module/autoload_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/autoload_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/module/autoload_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -122,6 +122,12 @@
     ModuleSpecs::Autoload::M.should == :autoload_m
   end
 
+  it "runs for an exception condition class and doesn't trample the exception" do
+    filename = fixture(__FILE__, "autoload_ex1.rb")
+    ModuleSpecs::Autoload.autoload :EX1, filename
+    ModuleSpecs::Autoload.use_ex1.should == :good
+  end
+
   ruby_version_is "" ... "1.9" do
     it "removes the constant from the constant table if load fails" do
       ModuleSpecs::Autoload.autoload :Fail, @non_existent

Added: MacRuby/trunk/spec/frozen/core/module/class_exec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/class_exec_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/module/class_exec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Module#class_exec" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/module/fixtures/autoload_ex1.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/fixtures/autoload_ex1.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/module/fixtures/autoload_ex1.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,16 @@
+
+class ModuleSpecs::Autoload::EX1 < Exception
+  def self.trample1
+    1.times { return }
+  end
+
+  def self.trample2
+    begin
+      raise "hello"
+    rescue
+    end
+  end
+
+  trample1
+  trample2
+end

Modified: MacRuby/trunk/spec/frozen/core/module/fixtures/classes.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/fixtures/classes.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/module/fixtures/classes.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -320,6 +320,16 @@
   module M2; end
 
   module Autoload
+    def self.use_ex1
+      begin
+        begin
+          raise "test exception"
+        rescue ModuleSpecs::Autoload::EX1
+        end
+      rescue RuntimeError
+        return :good
+      end
+    end
   end
 
   # This class isn't inherited from or included in anywhere. It exists to test

Added: MacRuby/trunk/spec/frozen/core/module/module_exec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/module_exec_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/module/module_exec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Module#module_exec" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/module/nesting_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/nesting_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/module/nesting_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -25,3 +25,7 @@
   end
 
 end
+
+describe "Module.nesting" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/module/public_instance_method_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/public_instance_method_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/module/public_instance_method_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Module#public_instance_method" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/module/remove_class_variable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/remove_class_variable_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/module/remove_class_variable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,2 +1,8 @@
 require File.expand_path('../../../spec_helper', __FILE__)
 require File.expand_path('../fixtures/classes', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Module#remove_class_variable" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/module/to_s_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/module/to_s_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/module/to_s_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,2 +1,6 @@
 require File.expand_path('../../../spec_helper', __FILE__)
 require File.expand_path('../fixtures/classes', __FILE__)
+
+describe "Module#to_s" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/mutex/lock_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/mutex/lock_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/mutex/lock_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Mutex#lock" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/mutex/locked_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/mutex/locked_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/mutex/locked_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Mutex#locked?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/mutex/sleep_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/mutex/sleep_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/mutex/sleep_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Mutex#sleep" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/mutex/synchronize_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/mutex/synchronize_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/mutex/synchronize_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Mutex#synchronize" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/mutex/try_lock_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/mutex/try_lock_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/mutex/try_lock_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Mutex#try_lock" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/mutex/unlock_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/mutex/unlock_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/mutex/unlock_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Mutex#unlock" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/nil/to_c_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/nil/to_c_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/nil/to_c_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "NilClass#to_c" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/numeric/modulo_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/numeric/modulo_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/numeric/modulo_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -21,3 +21,15 @@
     end
   end
 end
+
+ruby_version_is "1.9" do
+  describe "Numeric#%" do
+    it "needs to be reviewed for spec completeness"
+  end
+end
+
+ruby_version_is "1.9" do
+  describe "Numeric#modulo" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/numeric/real_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/numeric/real_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/numeric/real_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -6,3 +6,9 @@
     it_behaves_like(:numeric_real, :real)
   end
 end
+
+ruby_version_is "1.9" do
+  describe "Numeric#real?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/objectspace/add_finalizer_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/objectspace/add_finalizer_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/objectspace/add_finalizer_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "ObjectSpace.add_finalizer" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/objectspace/call_finalizer_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/objectspace/call_finalizer_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/objectspace/call_finalizer_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "ObjectSpace.call_finalizer" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/objectspace/count_objects_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/objectspace/count_objects_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/objectspace/count_objects_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "ObjectSpace.count_objects" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/objectspace/finalizers_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/objectspace/finalizers_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/objectspace/finalizers_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "ObjectSpace.finalizers" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/objectspace/remove_finalizer_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/objectspace/remove_finalizer_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/objectspace/remove_finalizer_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "ObjectSpace.remove_finalizer" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/objectspace/undefine_finalizer_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/objectspace/undefine_finalizer_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/objectspace/undefine_finalizer_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "ObjectSpace.undefine_finalizer" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/precision/prec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/precision/prec_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/precision/prec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -21,3 +21,7 @@
     end
   end
 end
+
+describe "Precision#prec" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/daemon_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/daemon_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/daemon_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Process.daemon" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/process/detach_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/detach_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/detach_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -26,3 +26,7 @@
     end
   end
 end
+
+describe "Process.detach" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/egid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/egid_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/egid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -13,3 +13,7 @@
     Process::Sys.getegid.should == Process.egid
   end
 end
+
+describe "Process.egid=" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/euid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/euid_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/euid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -13,3 +13,7 @@
     Process::Sys.geteuid.should == Process.euid
   end
 end
+
+describe "Process.euid=" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/exec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/exec_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/exec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Process.exec" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/process/exit_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/exit_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/exit_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,9 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "Process.exit" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Process.exit!" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/getpgrp_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/getpgrp_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/getpgrp_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,3 +1,7 @@
 require File.expand_path('../../../spec_helper', __FILE__)
 
 # see setpgrp_spec.rb
+
+describe "Process.getpgrp" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/getrlimit_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/getrlimit_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/getrlimit_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,3 +1,7 @@
 require File.expand_path('../../../spec_helper', __FILE__)
 
 # see setrlimit_spec.rb
+
+describe "Process.getrlimit" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/gid/change_privilege_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid/change_privilege_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/gid/change_privilege_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::GID.change_privilege" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/gid/eid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid/eid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/gid/eid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,9 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::GID.eid" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Process::GID.eid=" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/gid/grant_privilege_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid/grant_privilege_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/gid/grant_privilege_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::GID.grant_privilege" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/gid/re_exchange_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid/re_exchange_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/gid/re_exchange_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::GID.re_exchange" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/gid/re_exchangeable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid/re_exchangeable_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/gid/re_exchangeable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::GID.re_exchangeable?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/gid/rid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid/rid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/gid/rid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::GID.rid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/gid/sid_available_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid/sid_available_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/gid/sid_available_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::GID.sid_available?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/gid/switch_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid/switch_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/gid/switch_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::GID.switch" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/gid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/gid_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/gid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -16,3 +16,7 @@
     Process::Sys.getgid.should == Process.gid
   end
 end
+
+describe "Process.gid=" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/groups_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/groups_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/groups_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -32,3 +32,7 @@
     end
   end
 end
+
+describe "Process.groups=" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/maxgroups_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/maxgroups_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/maxgroups_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -12,3 +12,7 @@
     Process.maxgroups = n
   end
 end
+
+describe "Process.maxgroups=" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/setrlimit_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/setrlimit_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/setrlimit_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -71,26 +71,28 @@
       end
     end
 
-    it "limit and get total size for mlock(2) (bytes)" do
-      lim, max = Process.getrlimit(Process::RLIMIT_MEMLOCK)
-      lim.kind_of?(Integer).should == true
-      max.kind_of?(Integer).should == true
-      max = lim if lim > max # EINVAL is raised if this invariant is violated
-      Process.setrlimit(Process::RLIMIT_MEMLOCK, lim, max).should == nil
-    end
+    platform_is_not :solaris do
+      it "limit and get total size for mlock(2) (bytes)" do
+        lim, max = Process.getrlimit(Process::RLIMIT_MEMLOCK)
+        lim.kind_of?(Integer).should == true
+        max.kind_of?(Integer).should == true
+        max = lim if lim > max # EINVAL is raised if this invariant is violated
+        Process.setrlimit(Process::RLIMIT_MEMLOCK, lim, max).should == nil
+      end
 
-    it "limit and get number of processes for the user (number)" do
-      lim, max = Process.getrlimit(Process::RLIMIT_NPROC)
-      lim.kind_of?(Integer).should == true
-      max.kind_of?(Integer).should == true
-      Process.setrlimit(Process::RLIMIT_NPROC, lim, max).should == nil
-    end
+      it "limit and get number of processes for the user (number)" do
+        lim, max = Process.getrlimit(Process::RLIMIT_NPROC)
+        lim.kind_of?(Integer).should == true
+        max.kind_of?(Integer).should == true
+        Process.setrlimit(Process::RLIMIT_NPROC, lim, max).should == nil
+      end
 
-    it "limit and get resident memory size (bytes)" do
-      lim, max = Process.getrlimit(Process::RLIMIT_RSS)
-      lim.kind_of?(Integer).should == true
-      max.kind_of?(Integer).should == true
-      Process.setrlimit(Process::RLIMIT_RSS, lim, max).should == nil
+      it "limit and get resident memory size (bytes)" do
+        lim, max = Process.getrlimit(Process::RLIMIT_RSS)
+        lim.kind_of?(Integer).should == true
+        max.kind_of?(Integer).should == true
+        Process.setrlimit(Process::RLIMIT_RSS, lim, max).should == nil
+      end
     end
 
     platform_is :os => [:netbsd, :freebsd] do

Added: MacRuby/trunk/spec/frozen/core/process/spawn_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/spawn_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/spawn_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Process.spawn" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#&" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/coredump_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/coredump_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/coredump_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#coredump?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/equal_value_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/equal_value_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/equal_value_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#==" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/exited_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/exited_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/exited_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#exited?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/exitstatus_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/exitstatus_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/exitstatus_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#exitstatus" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/inspect_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/inspect_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/inspect_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#inspect" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/pid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/pid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/pid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#pid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/right_shift_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/right_shift_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/right_shift_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#>>" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/signaled_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/signaled_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/signaled_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#signaled?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/stopped_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/stopped_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/stopped_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#stopped?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/stopsig_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/stopsig_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/stopsig_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#stopsig" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/success_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/success_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/success_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#success?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/termsig_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/termsig_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/termsig_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#termsig" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/to_i_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/to_i_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/to_i_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#to_i" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/to_int_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/to_int_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/to_int_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#to_int" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/status/to_s_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/status/to_s_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/status/to_s_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Status#to_s" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/getegid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/getegid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/getegid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.getegid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/geteuid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/geteuid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/geteuid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.geteuid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/getgid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/getgid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/getgid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.getgid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/getuid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/getuid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/getuid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.getuid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/issetugid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/issetugid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/issetugid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.issetugid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setegid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setegid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setegid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setegid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/seteuid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/seteuid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/seteuid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.seteuid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setgid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setgid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setgid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setgid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setregid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setregid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setregid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setregid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setresgid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setresgid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setresgid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setresgid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setresuid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setresuid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setresuid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setresuid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setreuid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setreuid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setreuid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setreuid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setrgid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setrgid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setrgid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setrgid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setruid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setruid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setruid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setruid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/sys/setuid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/sys/setuid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/sys/setuid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::Sys.setuid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/uid/change_privilege_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid/change_privilege_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/uid/change_privilege_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::UID.change_privilege" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/uid/eid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid/eid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/uid/eid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,9 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::UID.eid" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Process::UID.eid=" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/uid/grant_privilege_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid/grant_privilege_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/uid/grant_privilege_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::UID.grant_privilege" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/uid/re_exchange_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid/re_exchange_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/uid/re_exchange_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::UID.re_exchange" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/uid/re_exchangeable_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid/re_exchangeable_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/uid/re_exchangeable_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::UID.re_exchangeable?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/uid/rid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid/rid_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/uid/rid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::UID.rid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/uid/sid_available_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid/sid_available_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/uid/sid_available_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::UID.sid_available?" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/process/uid/switch_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid/switch_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/process/uid/switch_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Process::UID.switch" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/uid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/uid_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/uid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -16,3 +16,7 @@
     Process::Sys.getuid.should == Process.uid
   end
 end
+
+describe "Process.uid=" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/waitpid2_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/waitpid2_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/waitpid2_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "Process.waitpid2" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/process/waitpid_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/process/waitpid_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/process/waitpid_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "Process.waitpid" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/random/marshal_dump_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/random/marshal_dump_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/random/marshal_dump_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Random#marshal_dump" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/random/marshal_load_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/random/marshal_load_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/random/marshal_load_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Random#marshal_load" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/rational/Rational_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/rational/Rational_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/rational/Rational_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,11 +1,35 @@
 ruby_version_is "1.9" do
   require File.expand_path('../../../shared/rational/Rational', __FILE__)
 
-  describe "Rational() passed two arguments" do
-    it_behaves_like(:rational_rational_two, :Rational)
-  end
+  describe "Rational()" do
+    describe "passed two arguments" do
+      it_behaves_like(:rational_rational_two, :Rational)
+    end
 
-  describe "Rational() passed Integer" do
-    it_behaves_like(:rational_rational_int, :Rational)
+    describe "passed Integer" do
+      it_behaves_like(:rational_rational_int, :Rational)
+    end
+
+    describe "passed two integers" do
+      it_behaves_like(:rational_rational_int_int, :Rational)
+    end
+
+    it "raises a TypeError if the arguments are not Integers" do
+      lambda {
+        Rational(nil)
+      }.should raise_error(TypeError)
+
+      lambda {
+        Rational(nil, 1)
+      }.should raise_error(TypeError)
+
+      lambda {
+        Rational(:foo, 1)
+      }.should raise_error(TypeError)
+
+      lambda {
+        Rational(:foo)
+      }.should raise_error(TypeError)
+    end
   end
 end

Added: MacRuby/trunk/spec/frozen/core/rational/magnitude_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/rational/magnitude_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/rational/magnitude_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+ruby_version_is "1.9" do
+  require File.expand_path('../../../shared/rational/abs', __FILE__)
+
+  describe "Rational#abs" do
+    it_behaves_like(:rational_abs, :magnitude)
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/rational/marshal_dump_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/rational/marshal_dump_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/rational/marshal_dump_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Rational#marshal_dump" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/rational/marshal_load_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/rational/marshal_load_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/rational/marshal_load_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Rational#marshal_load" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/regexp/escape_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/regexp/escape_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/regexp/escape_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,3 +4,7 @@
 describe "Range.escape" do
   it_behaves_like(:regexp_quote, :escape)
 end
+
+describe "Regexp.escape" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/regexp/inspect_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/regexp/inspect_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/regexp/inspect_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -5,12 +5,16 @@
     /ab+c/ix.inspect.should == "/ab+c/ix"
     /a(.)+s/n.inspect.should =~ %r|/a(.)+s/n?|  # Default 'n' may not appear
     # 1.9 doesn't round-trip the encoding flags, such as 'u'. This is
-    # seemingly by design.  
+    # seemingly by design.
     /a(.)+s/m.inspect.should == "/a(.)+s/m"     # But a specified one does
   end
-  
+
   it "correctly escapes forward slashes /" do
     Regexp.new("/foo/bar").inspect.should == "/\\/foo\\/bar/"
     Regexp.new("/foo/bar[/]").inspect.should == "/\\/foo\\/bar[\\/]/"
-  end  
+  end
+
+  it "doesn't over escape forward slashes" do
+    /\/foo\/bar/.inspect.should == '/\/foo\/bar/'
+  end
 end

Modified: MacRuby/trunk/spec/frozen/core/regexp/union_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/regexp/union_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/regexp/union_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,13 +4,29 @@
   it "returns /(?!)/ when passed no arguments" do
     Regexp.union.should == /(?!)/
   end
-  
+
   it "returns a regular expression that will match passed arguments" do
     Regexp.union("penzance").should == /penzance/
     Regexp.union("skiing", "sledding").should == /skiing|sledding/
     Regexp.union(/dogs/, /cats/i).should == /(?-mix:dogs)|(?i-mx:cats)/
   end
 
+  it "quotes any string arguments" do
+    Regexp.union("n", ".").should == /n|\./
+  end
+
+  ruby_version_is '' ... '1.9' do
+    it "propagates the kcode setting to the output Regexp" do
+      Regexp.union(/./u, "meow").kcode.should == "utf8"
+    end
+  end
+
+  it "raises ArgumentError if the kcodes conflict" do
+    lambda {
+      Regexp.union(/./u, /./e)
+    }.should raise_error(ArgumentError)
+  end
+
   it "uses to_str to convert arguments (if not Regexp)" do
     obj = mock('pattern')
     obj.should_receive(:to_str).and_return('foo')

Modified: MacRuby/trunk/spec/frozen/core/signal/trap_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/signal/trap_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/signal/trap_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "Signal.trap" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/string/case_compare_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/string/case_compare_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/string/case_compare_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "String#===" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/string/split_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/string/split_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/string/split_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -306,13 +306,23 @@
       [//, /:/, /\s+/].each do |pat|
         [-1, 0, 1, 2].each do |limit|
           str.dup.taint.split(pat, limit).each do |x|
-            x.tainted?.should be_true
+            # See the spec below for why the conditional is here
+            x.tainted?.should be_true unless x.empty?
           end
         end
       end
     end
   end
 
+  # When split is called with a limit of -1, empty fields are not suppressed
+  # and a final empty field is *alawys* created (who knows why). This empty
+  # string is not tainted (again, who knows why) on 1.8 but is on 1.9.
+  ruby_bug "#", "1.9" do
+    it "taints an empty string if self is tainted" do
+      ":".taint.split(//, -1).last.tainted?.should be_true
+    end
+  end
+
   it "doesn't taints the resulting strings if the Regexp is tainted" do
     ["", "x:y:z:", "  x  y  "].each do |str|
       [//, /:/, /\s+/].each do |pat|

Modified: MacRuby/trunk/spec/frozen/core/string/sub_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/string/sub_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/string/sub_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -359,6 +359,24 @@
     a.should == "h*llo"
   end
 
+  it "sets $~ for access from the block" do
+    str = "hello"
+    str.dup.sub!(/([aeiou])/) { "<#{$~[1]}>" }.should == "h<e>llo"
+    str.dup.sub!(/([aeiou])/) { "<#{$1}>" }.should == "h<e>llo"
+    str.dup.sub!("l") { "<#{$~[0]}>" }.should == "he<l>lo"
+
+    offsets = []
+
+    str.dup.sub!(/([aeiou])/) do
+       md = $~
+       md.string.should == str
+       offsets << md.offset(0)
+       str
+    end.should == "hhellollo"
+
+    offsets.should == [[1, 2]]
+  end
+
   it "taints self if block's result is tainted" do
     a = "hello"
     a.sub!(/./.taint) { "foo" }.tainted?.should == false

Modified: MacRuby/trunk/spec/frozen/core/string/unpack_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/string/unpack_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/string/unpack_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -455,7 +455,7 @@
 end
 
 describe "String#unpack with 'M' directive" do
-  it "returns an array by decoding self according to the format string" do
+  it "decodes the rest of the string as MIMEs quoted-printable" do
     "".unpack('M').should == [""]
     "=5".unpack('Ma').should == ["", ""]
     "abc=".unpack('M').should == ["abc"]
@@ -473,6 +473,14 @@
     "=$$=4@=47".unpack('M5000').should == [""]
     "=4@".unpack('MMM').should == ["", "@", ""]
   end
+
+  it "decodes across new lines" do
+    input = "A fax has arrived from remote ID ''.=0D=0A-----------------------=\r\n-------------------------------------=0D=0ATime: 3/9/2006 3:50:52=\r\n PM=0D=0AReceived from remote ID: =0D=0AInbound user ID XXXXXXXXXX, r=\r\nouting code XXXXXXXXX=0D=0AResult: (0/352;0/0) Successful Send=0D=0AP=\r\nage record: 1 - 1=0D=0AElapsed time: 00:58 on channel 11=0D=0A"
+
+    expected = "A fax has arrived from remote ID ''.\r\n------------------------------------------------------------\r\nTime: 3/9/2006 3:50:52 PM\r\nReceived from remote ID: \r\nInbound user ID XXXXXXXXXX, routing code XXXXXXXXX\r\nResult: (0/352;0/0) Successful Send\r\nPage record: 1 - 1\r\nElapsed time: 00:58 on channel 11\r\n"
+
+    input.unpack("M").first.should == expected
+  end
 end
 
 describe "String#unpack with 'm' directive" do

Added: MacRuby/trunk/spec/frozen/core/struct/tms/cstime_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/struct/tms/cstime_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/struct/tms/cstime_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,9 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Struct::Tms#cstime" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Struct::Tms#cstime=" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/struct/tms/cutime_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/struct/tms/cutime_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/struct/tms/cutime_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,9 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Struct::Tms#cutime" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Struct::Tms#cutime=" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/struct/tms/element_reference_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/struct/tms/element_reference_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/struct/tms/element_reference_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Struct::Tms.[]" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/struct/tms/members_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/struct/tms/members_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/struct/tms/members_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Struct::Tms.members" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/struct/tms/new_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/struct/tms/new_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/struct/tms/new_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,5 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Struct::Tms.new" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/struct/tms/stime_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/struct/tms/stime_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/struct/tms/stime_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,9 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Struct::Tms#stime" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Struct::Tms#stime=" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/struct/tms/utime_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/struct/tms/utime_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/struct/tms/utime_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,9 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe "Struct::Tms#utime" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Struct::Tms#utime=" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/symbol/element_reference_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/symbol/element_reference_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/symbol/element_reference_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Symbol#[]" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/symbol/encoding_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/symbol/encoding_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/symbol/encoding_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Symbol#encoding" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/symbol/length_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/symbol/length_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/symbol/length_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Symbol#length" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/symbol/match_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/symbol/match_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/symbol/match_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,13 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Symbol#=~" do
+    it "needs to be reviewed for spec completeness"
+  end
+end
+
+ruby_version_is "1.9" do
+  describe "Symbol#match" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/symbol/next_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/symbol/next_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/symbol/next_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Symbol#next" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/symbol/size_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/symbol/size_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/symbol/size_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Symbol#size" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/symbol/slice_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/symbol/slice_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/symbol/slice_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Symbol#slice" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/symbol/succ_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/symbol/succ_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/symbol/succ_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Symbol#succ" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/abort_on_exception_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/abort_on_exception_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/abort_on_exception_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -9,3 +9,15 @@
     Thread.abort_on_exception.should == false
   end
 end
+
+describe "Thread#abort_on_exception=" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Thread.abort_on_exception" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Thread.abort_on_exception=" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/thread/add_trace_func_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/add_trace_func_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/thread/add_trace_func_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Thread#add_trace_func" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/thread/backtrace_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/backtrace_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/thread/backtrace_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Thread#backtrace" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/thread/exclusive_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/exclusive_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/thread/exclusive_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Thread.exclusive" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/exit_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/exit_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/exit_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -7,3 +7,11 @@
     it_behaves_like :thread_exit, :exit
   end
 end
+
+describe "Thread#exit!" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Thread.exit" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/fork_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/fork_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/fork_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,2 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
\ No newline at end of file
+require File.expand_path('../fixtures/classes', __FILE__)
+describe "Thread.fork" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/group_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/group_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/group_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,2 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
\ No newline at end of file
+require File.expand_path('../fixtures/classes', __FILE__)
+describe "Thread#group" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/kill_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/kill_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/kill_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -5,3 +5,11 @@
 describe "Thread#kill" do
   it_behaves_like :thread_exit, :kill
 end
+
+describe "Thread#kill!" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Thread.kill" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/list_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/list_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/list_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -25,3 +25,7 @@
     end
   end
 end
+
+describe "Thread.list" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/priority_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/priority_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/priority_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,2 +1,9 @@
 require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
\ No newline at end of file
+require File.expand_path('../fixtures/classes', __FILE__)
+describe "Thread#priority" do
+  it "needs to be reviewed for spec completeness"
+end
+
+describe "Thread#priority=" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/safe_level_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/safe_level_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/safe_level_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,2 +1,6 @@
 require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
\ No newline at end of file
+require File.expand_path('../fixtures/classes', __FILE__)
+
+describe "Thread#safe_level" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/thread/set_trace_func_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/set_trace_func_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/thread/set_trace_func_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Thread#set_trace_func" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/start_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/start_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/start_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,2 +1,6 @@
 require File.expand_path('../../../spec_helper', __FILE__)
-require File.expand_path('../fixtures/classes', __FILE__)
\ No newline at end of file
+require File.expand_path('../fixtures/classes', __FILE__)
+
+describe "Thread.start" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/thread/terminate_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/thread/terminate_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/thread/terminate_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -5,3 +5,7 @@
 describe "Thread#terminate" do
   it_behaves_like :thread_exit, :terminate
 end
+
+describe "Thread#terminate!" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/threadgroup/enclose_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/threadgroup/enclose_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/threadgroup/enclose_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "ThreadGroup#enclose" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/threadgroup/enclosed_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/threadgroup/enclosed_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/threadgroup/enclosed_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1,5 @@
 require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "ThreadGroup#enclosed?" do
+  it "needs to be reviewed for spec completeness"
+end

Modified: MacRuby/trunk/spec/frozen/core/time/_load_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/_load_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/time/_load_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -33,3 +33,7 @@
     Time._load([high, low].pack("VV")).should == t
   end
 end
+
+describe "Time._load" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/time/friday_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/friday_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/friday_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#friday?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/time/inspect_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/inspect_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/time/inspect_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -5,3 +5,7 @@
 describe "Time.inspect" do
   it_behaves_like :inspect, :inspect
 end
+
+describe "Time#inspect" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/time/monday_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/monday_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/monday_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#monday?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/time/nsec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/nsec_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/nsec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#nsec" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/time/round_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/round_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/round_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#round" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/time/saturday_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/saturday_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/saturday_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#saturday?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/time/subsec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/subsec_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/subsec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#subsec" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/time/sunday_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/sunday_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/sunday_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#sunday?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/time/thursday_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/thursday_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/thursday_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#thursday?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/time/to_s_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/to_s_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/time/to_s_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -5,3 +5,7 @@
 describe "Time.to_s" do
   it_behaves_like :inspect, :to_s
 end
+
+describe "Time#to_s" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/time/tuesday_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/tuesday_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/tuesday_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#tuesday?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/time/tv_nsec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/tv_nsec_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/tv_nsec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#tv_nsec" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/core/time/tv_usec_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/tv_usec_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/core/time/tv_usec_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,2 +1,6 @@
 require File.expand_path('../../../spec_helper', __FILE__)
 require File.expand_path('../fixtures/methods', __FILE__)
+
+describe "Time#tv_usec" do
+  it "needs to be reviewed for spec completeness"
+end

Added: MacRuby/trunk/spec/frozen/core/time/wednesday_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/wednesday_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/time/wednesday_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "Time#wednesday?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/unboundmethod/eql_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/unboundmethod/eql_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/unboundmethod/eql_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "UnboundMethod#eql?" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/unboundmethod/hash_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/unboundmethod/hash_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/unboundmethod/hash_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "UnboundMethod#hash" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/unboundmethod/parameters_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/unboundmethod/parameters_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/unboundmethod/parameters_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "UnboundMethod#parameters" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Added: MacRuby/trunk/spec/frozen/core/unboundmethod/source_location_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/unboundmethod/source_location_spec.rb	                        (rev 0)
+++ MacRuby/trunk/spec/frozen/core/unboundmethod/source_location_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -0,0 +1,7 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+ruby_version_is "1.9" do
+  describe "UnboundMethod#source_location" do
+    it "needs to be reviewed for spec completeness"
+  end
+end

Modified: MacRuby/trunk/spec/frozen/language/BEGIN_spec_disabled.rb
===================================================================
--- MacRuby/trunk/spec/frozen/language/BEGIN_spec_disabled.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/language/BEGIN_spec_disabled.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -25,6 +25,12 @@
         eval "BEGIN { outside_var }"
       }.should_not raise_error NameError
     end
+
+    it "must appear in a top-level context" do
+      lambda do
+        eval "1.times{ BEGIN{ :begun }}"
+      end.should raise_error(SyntaxError)
+    end
   end
 
   it "runs first in a given code unit" do

Modified: MacRuby/trunk/spec/frozen/language/defined_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/language/defined_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/language/defined_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,338 +1,1125 @@
 require File.expand_path('../../spec_helper', __FILE__)
 require File.expand_path('../fixtures/defined', __FILE__)
 
-describe "The defined? keyword" do
-  class LanguageDefinedSpecs
-    SomeConst = 5
+describe "The defined? keyword for literals" do
+  it "returns 'self' for self" do
+    ret = defined?(self)
+    ret.should == "self"
+  end
 
-    attr_accessor :ivar
+  it "returns 'nil' for nil" do
+    ret = defined?(nil)
+    ret.should == "nil"
+  end
 
-    def no_args
+  it "returns 'true' for true" do
+    ret = defined?(true)
+    ret.should == "true"
+  end
+
+  it "returns 'false' for false" do
+    ret = defined?(false)
+    ret.should == "false"
+  end
+end
+
+describe "The defined? keyword when called with a method name" do
+  describe "without a receiver" do
+    it "returns 'method' if the method is defined" do
+      defined?(puts).should == "method"
     end
-    def args(x)
+
+    it "returns nil if the method is not defined" do
+      defined?(defined_specs_undefined_method).should be_nil
     end
+  end
 
-    def lvar_defined
-      x = 1
-      defined?(x)
+  describe "having a module as receiver" do
+    it "returns 'method' if the method is defined" do
+      defined?(Kernel.puts).should == "method"
     end
 
-    def ivar_definition
-      defined? @ivar
+    it "returns nil if the method is private" do
+      defined?(Object.print).should be_nil
     end
 
+    it "returns nil if the method is not defined" do
+      defined?(Kernel.defined_specs_undefined_method).should be_nil
+    end
+
+    it "returns nil if the class is not defined" do
+      defined?(DefinedSpecsUndefined.puts).should be_nil
+    end
+
+    it "returns nil if the subclass is not defined" do
+      defined?(DefinedSpecs::Undefined.puts).should be_nil
+    end
   end
 
-  class LanguageDefinedSubclass < LanguageDefinedSpecs
-    def no_args
-      defined?(super)
+  describe "having a local variable as receiver" do
+    it "returns 'method' if the method is defined" do
+      obj = DefinedSpecs::Basic.new
+      defined?(obj.a_defined_method).should == "method"
     end
-    def args
-      defined?( super() )
+
+    it "returns nil if the method is not defined" do
+      obj = DefinedSpecs::Basic.new
+      defined?(obj.an_undefined_method).should be_nil
     end
+
+    it "returns nil if the variable does not exist" do
+      defined?(nonexistent_local_variable.some_method).should be_nil
+    end
+
+    ruby_version_is "1.9" do
+      it "calls #respond_to_missing?" do
+        obj = mock("respond_to_missing object")
+        obj.should_receive(:respond_to_missing?).and_return(true)
+        defined?(obj.something_undefined).should == "method"
+      end
+    end
   end
 
-  class LanguageDefinedSubclassDM < LanguageDefinedSpecs
-    define_method(:no_args) {
-      defined?(super)
-    }
+  describe "having an instance variable as receiver" do
+    it "returns 'method' if the method is defined" do
+      @defined_specs_obj = DefinedSpecs::Basic.new
+      defined?(@defined_specs_obj.a_defined_method).should == "method"
+    end
 
-    define_method(:args) {
-      defined?(super())
-    }
+    it "returns nil if the method is not defined" do
+      @defined_specs_obj = DefinedSpecs::Basic.new
+      defined?(@defined_specs_obj.an_undefined_method).should be_nil
+    end
+
+    it "returns nil if the variable does not exist" do
+      defined?(@nonexistent_instance_variable.some_method).should be_nil
+    end
   end
 
-  class LanguageDefinedSubclassBlock < LanguageDefinedSpecs
-    def no_args
-      ret = nil
-      1.times { ret = defined?(super) }
-      ret
+  describe "having a global variable as receiver" do
+    it "returns 'method' if the method is defined" do
+      $defined_specs_obj = DefinedSpecs::Basic.new
+      defined?($defined_specs_obj.a_defined_method).should == "method"
     end
 
-    def args
-      ret = nil
-      1.times { ret = defined?( super() ) }
-      ret
+    it "returns nil if the method is not defined" do
+      $defined_specs_obj = DefinedSpecs::Basic.new
+      defined?($defined_specs_obj.an_undefined_method).should be_nil
     end
+
+    it "returns nil if the variable does not exist" do
+      defined?($nonexistent_global_variable.some_method).should be_nil
+    end
   end
 
-  class LanguageDefinedSubclassDMBlock < LanguageDefinedSpecs
-    define_method(:no_args) {
-      ret = nil
-      1.times { ret = defined?(super) }
-      ret
-    }
+  describe "having a class variable as receiver" do
+    it "returns 'method' if the method is defined" do
+      @@defined_specs_obj = DefinedSpecs::Basic.new
+      defined?(@@defined_specs_obj.a_defined_method).should == "method"
+    end
 
-    define_method(:args) {
-      ret = nil
-      1.times { ret = defined?(super()) }
-      ret
-    }
+    it "returns nil if the method is not defined" do
+      @@defined_specs_obj = DefinedSpecs::Basic.new
+      defined?(@@defined_specs_obj.an_undefined_method).should be_nil
+    end
+
+    it "returns nil if the variable does not exist" do
+      defined?(@@nonexistent_class_variable.some_method).should be_nil
+    end
   end
 
-  module AAA
-    self::FOO = 'x' unless defined? self::FOO rescue nil
+  describe "having a method call as a receiver" do
+    it "returns nil if evaluating the receiver raises an exception" do
+      defined?(DefinedSpecs.exception_method / 2).should be_nil
+      ScratchPad.recorded.should == :defined_specs_exception
+    end
+
+    it "returns nil if the method is not defined on the object the receiver returns" do
+      defined?(DefinedSpecs.side_effects / 2).should be_nil
+      ScratchPad.recorded.should == :defined_specs_side_effects
+    end
+
+    it "returns 'method' if the method is defined on the object the receiver returns" do
+      defined?(DefinedSpecs.fixnum_method / 2).should == "method"
+      ScratchPad.recorded.should == :defined_specs_fixnum_method
+    end
   end
+end
 
-  it "returns 'method' when defined?(exit) is sent" do
-    ret = defined?(exit)
-    ret.should == 'method'
+describe "The defined? keyword for an expression" do
+  before :each do
+    ScratchPad.clear
   end
 
-  it "returns 'method' when defined?(Kernel.puts) is sent (attribute)" do
-    ret = defined?(Kernel.puts)
-    ret.should == 'method'
+  it "returns 'assignment' for assigning a local variable" do
+    defined?(x = 2).should == "assignment"
   end
 
-  it "returns nil when defined?(DoesNotExist.puts) is sent" do
-    ret = defined?(DoesNotExist.puts)
-    ret.should == nil
+  it "returns 'assignment' for assigning an instance variable" do
+    defined?(@defined_specs_x = 2).should == "assignment"
   end
 
-  it "returns nil when defined?(Kernel.does_not_exist) is sent" do
-    ret = defined?(Kernel.does_not_exist)
-    ret.should == nil
+  it "returns 'assignment' for assigning a global variable" do
+    defined?($defined_specs_x = 2).should == "assignment"
   end
 
-  it "returns 'assignment' when defined?(x = 2) is sent" do
-    ret = defined?(x = 2)
-    ret.should == 'assignment'
+  it "returns 'assignment' for assigning a class variable" do
+    defined?(@@defined_specs_x = 2).should == "assignment"
   end
 
-  it "returns 'local-variable' when x = 1; defined?(x) is sent" do
-    obj = LanguageDefinedSpecs.new
-    obj.lvar_defined.should == 'local-variable'
+  it "returns 'assignment' for assigning multiple variables" do
+    defined?((a, b = 1, 2)).should == "assignment"
   end
 
-  it "returns 'constant' when defined?(Object) is sent" do
-    ret = defined?(Object)
-    ret.should == 'constant'
+  it "returns 'assignment' for an expression with '%='" do
+    defined?(x %= 2).should == "assignment"
   end
 
-  it "returns 'class variable' when @@x = 1; defined?(@@x) is sent" do
-    @@x = 1
-    ret = defined?(@@x)
-    ret.should == 'class variable'
+  it "returns 'assignment' for an expression with '/='" do
+    defined?(x /= 2).should == "assignment"
   end
 
-  it "returns 'instance-variable' when @x = 1; defined?(@x) is sent" do
-    @x = 1
-    ret = defined?(@x)
-    ret.should == 'instance-variable'
+  it "returns 'assignment' for an expression with '-='" do
+    defined?(x -= 2).should == "assignment"
   end
 
-  it "returns 'global-variable' when $x = 1; defined?($x) is sent" do
-    $x = 1
-    ret = defined?($x)
-    ret.should == 'global-variable'
+  it "returns 'assignment' for an expression with '+='" do
+    defined?(x += 2).should == "assignment"
   end
 
-  it "returns 'expression' when defined?('foo = bar') is sent" do
-    ret = defined?('foo = bar')
-    ret.should == "expression"
+  it "returns 'assignment' for an expression with '*='" do
+    defined?(x *= 2).should == "assignment"
   end
 
-  it "returns 'self' when defined?(self) is sent" do
-    ret = defined?(self)
-    ret.should == "self"
+  it "returns 'assignment' for an expression with '|='" do
+    defined?(x |= 2).should == "assignment"
   end
 
-  it "returns 'nil' when defined?(nil) is sent" do
-    ret = defined?(nil)
-    ret.should == "nil"
+  it "returns 'assignment' for an expression with '&='" do
+    defined?(x &= 2).should == "assignment"
   end
 
-  it "returns 'true' when defined?(true) is sent" do
-    ret = defined?(true)
-    ret.should == "true"
+  it "returns 'assignment' for an expression with '^='" do
+    defined?(x ^= 2).should == "assignment"
   end
 
-  it "returns 'false' when defined?(false) is sent" do
-    ret = defined?(false)
-    ret.should == "false"
+  it "returns 'assignment' for an expression with '~='" do
+    defined?(x = 2).should == "assignment"
   end
 
-  it "returns nil when defined?(no_such_local) is sent" do
-    ret = defined?(no_such_local)
-    ret.should == nil
+  it "returns 'assignment' for an expression with '<<='" do
+    defined?(x <<= 2).should == "assignment"
   end
 
-  it "returns nil for defined?(super) when a superclass undef's the method" do
-    DefinedSpecs::ClassWithoutMethod.new.test.should be_nil
+  it "returns 'assignment' for an expression with '>>='" do
+    defined?(x >>= 2).should == "assignment"
   end
 
-  it "returns 'expression' when defined?(:File) is sent" do
-    ret = defined?(:File)
-    ret.should == "expression"
+  it "returns 'assignment' for an expression with '||='" do
+    defined?(x ||= 2).should == "assignment"
   end
 
-  it "returns 'constant' when defined?(LanguageDefinedSpecs::SomeConst) is sent" do
-    ret = defined?(LanguageDefinedSpecs::SomeConst)
-    ret.should == "constant"
+  it "returns 'assignment' for an expression with '&&='" do
+    defined?(x &&= 2).should == "assignment"
   end
-  
-  it "returns nil when defined?(LanguageDefinedSpecs::MissingConst) is sent" do
-    ret = defined?(LanguageDefinedSpecs::MissingConst)
-    ret.should == nil
+
+  it "returns 'assignment' for an expression with '**='" do
+    defined?(x **= 2).should == "assignment"
   end
 
-  it "returns nil when defined?(LanguageDefinedSpecs::MissingConst::MissingConst) is sent" do
-    ret = defined?(LanguageDefinedSpecs::MissingConst::MissingConst)
-    ret.should == nil
+  it "returns nil for an expression with == and an undefined method" do
+    defined?(defined_specs_undefined_method == 2).should be_nil
   end
 
-  it "returns 'constant' when evaluating self::FOO in module AAA" do
-    ret = defined?(AAA::FOO)
-    ret.should == 'constant'
+  it "returns nil for an expression with != and an undefined method" do
+    defined?(defined_specs_undefined_method != 2).should be_nil
   end
 
-  it "returns 'constant' when evaluating self::FOO in subclass's metaclass" do
-    o = Object.new
-    class << o
-      class Foo; Baz = 1; end
-      class Bar < Foo; def self.baz_defined?; defined? self::Baz; end; end
-      def bar; Bar; end
+  it "returns nil for an expression with !~ and an undefined method" do
+    defined?(defined_specs_undefined_method !~ 2).should be_nil
+  end
+
+  it "returns 'method' for an expression with '=='" do
+    x = 42
+    defined?(x == 2).should == "method"
+  end
+
+  ruby_version_is ""..."1.9" do
+    it "returns 'expression' for an expression with '!='" do
+      x = 42
+      defined?(x != 2).should == "expression"
     end
-    o.bar.baz_defined?.should == 'constant'
+
+    it "returns 'expression' for an expression with '!~'" do
+      x = 42
+      defined?(x !~ 2).should == "expression"
+    end
   end
 
-  it "returns 'constant' when defined?(File) is sent" do
-    ret = defined?(File)
-    ret.should == "constant"
+  ruby_version_is "1.9" do
+    it "returns 'method' for an expression with '!='" do
+      x = 42
+      defined?(x != 2).should == "method"
+    end
+
+    it "returns 'method' for an expression with '!~'" do
+      x = 42
+      defined?(x !~ 2).should == "method"
+    end
   end
 
-  it "returns 'constant' when defined?(::File) is sent" do
-    ret = defined?(::File)
-    ret.should == "constant"
+  it "returns nil for an expression with 'not' and an undefined method" do
+    defined?(not defined_specs_undefined_method).should be_nil
   end
 
-  it "returns 'constant' when defined?(File::SEPARATOR) is sent" do
-    ret = defined?(File::SEPARATOR)
-    ret.should == "constant"
+  it "returns nil for an expression with 'not' and an unset class variable" do
+    defined?(not @@defined_specs_undefined_class_variable).should be_nil
   end
 
-  it "returns 'method' when defined?(Object.nil?) is sent" do
-    ret = defined?(Object.nil?)
-    ret.should == "method"
+  it "does not propagate an exception raised by a method in a 'not' expression" do
+    defined?(not DefinedSpecs.exception_method).should be_nil
+    ScratchPad.recorded.should == :defined_specs_exception
   end
 
-  it "returns 'expression' when defined?(0) is sent" do
-    ret = defined?(0)
-    ret.should == "expression"
+  ruby_version_is ""..."1.9" do
+    it "calls a method in a 'not' expression and returns 'expression'" do
+      defined?(not DefinedSpecs.side_effects).should == "expression"
+      ScratchPad.recorded.should == :defined_specs_side_effects
+    end
+
+    it "returns 'expression' for an expression with 'not' and an unset global variable" do
+      defined?(not $defined_specs_undefined_global_variable).should == "expression"
+    end
+
+    it "returns 'expression' for an expression with 'not' and an unset instance variable" do
+      defined?(not @defined_specs_undefined_global_variable).should == "expression"
+    end
   end
 
-  # MacRuby TODO: compile error
-  # it "returns 'yield' when there is a block to yield to and defined?(yield) is sent" do
-  #   def y
-  #     ret = defined?(yield)
-  #     ret.should == 'yield'
-  #   end
-  #   y {|a| true}
-  # end
+  ruby_version_is "1.9" do
+    it "returns 'method' for a 'not' expression with a method" do
+      defined?(not DefinedSpecs.side_effects).should == "method"
+    end
 
+    it "calls a method in a 'not' expression and returns 'method'" do
+      defined?(not DefinedSpecs.side_effects).should == "method"
+      ScratchPad.recorded.should == :defined_specs_side_effects
+    end
+
+    it "returns nil for an expression with 'not' and an unset global variable" do
+      defined?(not $defined_specs_undefined_global_variable).should be_nil
+    end
+
+    it "returns nil for an expression with 'not' and an unset instance variable" do
+      defined?(not @defined_specs_undefined_global_variable).should be_nil
+    end
+  end
+
+  it "returns nil for an expression with '!' and an undefined method" do
+    defined?(!defined_specs_undefined_method).should be_nil
+  end
+
+  it "returns nil for an expression with '!' and an unset class variable" do
+    defined?(!@@defined_specs_undefined_class_variable).should be_nil
+  end
+
+  ruby_version_is ""..."1.9" do
+    it "returns 'expression' for an expression with '!' and an unset global variable" do
+      defined?(!$defined_specs_undefined_global_variable).should == "expression"
+    end
+
+    it "returns 'expression' for an expression with '!' and an unset instance variable" do
+      defined?(!@defined_specs_undefined_global_variable).should == "expression"
+    end
+  end
+
+  ruby_version_is "1.9" do
+    it "returns nil for an expression with '!' and an unset global variable" do
+      defined?(!$defined_specs_undefined_global_variable).should be_nil
+    end
+
+    it "returns nil for an expression with '!' and an unset instance variable" do
+      defined?(!@defined_specs_undefined_global_variable).should be_nil
+    end
+  end
+
+  it "returns 'expression' when passed a String" do
+    defined?("garble gooble gable").should == "expression"
+  end
+
+  describe "with a dynamic String" do
+    it "returns 'expression' when the String contains a literal" do
+      defined?("garble #{42}").should == "expression"
+    end
+
+    it "returns 'expression' when the String contains a call to a defined method" do
+      defined?("garble #{DefinedSpecs.side_effects}").should == "expression"
+    end
+
+    ruby_version_is ""..."1.9" do
+      it "returns nil when the String contains a call to an undefined method" do
+        defined?("garble #{DefinedSpecs.undefined_method}").should be_nil
+      end
+
+      it "calls the method in the String" do
+        defined?("garble #{DefinedSpecs.side_effects}").should == "expression"
+        ScratchPad.recorded.should == :defined_specs_side_effects
+      end
+
+      it "returns nil if any of the interpolated method calls are undefined" do
+        defined?("#{DefinedSpecs.side_effects} #{DefinedSpecs.undefined_method}").should be_nil
+        ScratchPad.recorded.should == :defined_specs_side_effects
+      end
+
+      it "returns nil and stops processing if any of the interpolated method calls are undefined" do
+        defined?("#{DefinedSpecs.undefined_method} #{DefinedSpecs.side_effects}").should be_nil
+        ScratchPad.recorded.should be_nil
+      end
+    end
+
+    ruby_version_is "1.9" do
+      it "returns 'expression' when the String contains a call to an undefined method" do
+        defined?("garble #{DefinedSpecs.undefined_method}").should == "expression"
+      end
+
+      it "does not call the method in the String" do
+        defined?("garble #{DefinedSpecs.dynamic_string}").should == "expression"
+        ScratchPad.recorded.should be_nil
+      end
+    end
+  end
+
+  describe "with a dynamic Regexp" do
+    it "returns 'expression' when the Regexp contains a literal" do
+      defined?(/garble #{42}/).should == "expression"
+    end
+
+    it "returns 'expression' when the Regexp contains a call to a defined method" do
+      defined?(/garble #{DefinedSpecs.side_effects}/).should == "expression"
+    end
+
+    ruby_version_is ""..."1.9" do
+      it "returns nil when the Regexp contains a call to an undefined method" do
+        defined?(/garble #{DefinedSpecs.undefined_method}/).should be_nil
+      end
+
+      it "calls the method in the Regexp" do
+        defined?(/garble #{DefinedSpecs.side_effects}/).should == "expression"
+        ScratchPad.recorded.should == :defined_specs_side_effects
+      end
+
+      it "returns nil if any of the interpolated method calls are undefined" do
+        defined?(/#{DefinedSpecs.side_effects} #{DefinedSpecs.undefined_method}/).should be_nil
+        ScratchPad.recorded.should == :defined_specs_side_effects
+      end
+
+      it "returns nil and stops processing if any of the interpolated method calls are undefined" do
+        defined?(/#{DefinedSpecs.undefined_method} #{DefinedSpecs.side_effects}/).should be_nil
+        ScratchPad.recorded.should be_nil
+      end
+    end
+
+    ruby_version_is "1.9" do
+      it "returns 'expression' when the Regexp contains a call to an undefined method" do
+        defined?(/garble #{DefinedSpecs.undefined_method}/).should == "expression"
+      end
+
+      it "does not call the method in the Regexp" do
+        defined?(/garble #{DefinedSpecs.dynamic_string}/).should == "expression"
+        ScratchPad.recorded.should be_nil
+      end
+    end
+  end
+
+  it "returns 'expression' when passed a Fixnum literal" do
+    defined?(42).should == "expression"
+  end
+
+  it "returns 'expression' when passed a Bignum literal" do
+    defined?(0xdead_beef_deed_feed).should == "expression"
+  end
+
+  it "returns 'expression' when passed a Float literal" do
+    defined?(1.5).should == "expression"
+  end
+
+  it "returns 'expression' when passed a Range literal" do
+    defined?(0..2).should == "expression"
+  end
+
+  it "returns 'expression' when passed a Regexp literal" do
+    defined?(/undefined/).should == "expression"
+  end
+
+  it "returns 'expression' when passed an Array literal" do
+    defined?([1, 2]).should == "expression"
+  end
+
+  it "returns 'expression' when passed a Hash literal" do
+    defined?({:a => :b}).should == "expression"
+  end
+
+  it "returns 'expression' when passed a Symbol literal" do
+    defined?(:defined_specs).should == "expression"
+  end
+end
+
+describe "The defined? keyword for variables" do
+  it "returns 'local-variable' when called with the name of a local variable" do
+    DefinedSpecs::Basic.new.local_variable_defined.should == "local-variable"
+  end
+
+  it "returns nil for an instance variable that has not been read" do
+    DefinedSpecs::Basic.new.instance_variable_undefined.should be_nil
+  end
+
+  it "returns nil for an instance variable that has been read but not assigned to" do
+    DefinedSpecs::Basic.new.instance_variable_read.should be_nil
+  end
+
+  it "returns 'instance-variable' for an instance variable that has been assigned" do
+    DefinedSpecs::Basic.new.instance_variable_defined.should == "instance-variable"
+  end
+
+  it "returns nil for a global variable that has not been read" do
+    DefinedSpecs::Basic.new.global_variable_undefined.should be_nil
+  end
+
+  it "returns nil for a global variable that has been read but not assigned to" do
+    DefinedSpecs::Basic.new.global_variable_read.should be_nil
+  end
+
+  # MRI appears to special case defined? for $! and $~ in that it returns
+  # 'global-variable' even when they are not set (or they are always "set"
+  # but the value may be nil). In other words, 'defined?($~)' will return
+  # 'global-variable' even if no match has been done.
+
+  it "returns 'global-variable' for $!" do
+    defined?($!).should == "global-variable"
+  end
+
+  it "returns 'global-variable for $~" do
+    defined?($~).should == "global-variable"
+  end
+
+  describe "when a String does not match a Regexp" do
+    before :each do
+      "mis-matched" =~ /z(z)z/
+    end
+
+    it "returns 'global-variable' for $~" do
+      defined?($~).should == "global-variable"
+    end
+
+    it "returns nil for $&" do
+      defined?($&).should be_nil
+    end
+
+    it "returns nil for $`" do
+      defined?($`).should be_nil
+    end
+
+    it "returns nil for $'" do
+      defined?($').should be_nil
+    end
+
+    it "returns nil for $+" do
+      defined?($+).should be_nil
+    end
+
+    it "returns nil for $1-$9" do
+      defined?($1).should be_nil
+      defined?($2).should be_nil
+      defined?($3).should be_nil
+      defined?($4).should be_nil
+      defined?($5).should be_nil
+      defined?($6).should be_nil
+      defined?($7).should be_nil
+      defined?($8).should be_nil
+      defined?($9).should be_nil
+    end
+  end
+
+  describe "when a String matches a Regexp" do
+    before :each do
+      "mis-matched" =~ /s(-)m(.)/
+    end
+
+    ruby_version_is ""..."1.9" do
+      it "returns 'global-variable' for $~" do
+        defined?($~).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $&" do
+        defined?($&).should == "$&"
+      end
+
+      it "returns 'global-variable' for $`" do
+        defined?($`).should == "$`"
+      end
+
+      it "returns 'global-variable' for $'" do
+        defined?($').should == "$'"
+      end
+
+      it "returns 'global-variable' for $+" do
+        defined?($+).should == "$+"
+      end
+
+      it "returns 'global-variable' for the capture references" do
+        defined?($1).should == "$1"
+        defined?($2).should == "$2"
+      end
+    end
+
+    ruby_version_is "1.9" do
+      it "returns 'global-variable' for $~" do
+        defined?($~).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $&" do
+        defined?($&).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $`" do
+        defined?($`).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $'" do
+        defined?($').should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $+" do
+        defined?($+).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for the capture references" do
+        defined?($1).should == "global-variable"
+        defined?($2).should == "global-variable"
+      end
+    end
+
+    it "returns nil for non-captures" do
+      defined?($3).should be_nil
+      defined?($4).should be_nil
+      defined?($5).should be_nil
+      defined?($6).should be_nil
+      defined?($7).should be_nil
+      defined?($8).should be_nil
+      defined?($9).should be_nil
+    end
+  end
+
+  describe "when a Regexp does not match a String" do
+    before :each do
+      /z(z)z/ =~ "mis-matched"
+    end
+
+    it "returns 'global-variable' for $~" do
+      defined?($~).should == "global-variable"
+    end
+
+    it "returns nil for $&" do
+      defined?($&).should be_nil
+    end
+
+    it "returns nil for $`" do
+      defined?($`).should be_nil
+    end
+
+    it "returns nil for $'" do
+      defined?($').should be_nil
+    end
+
+    it "returns nil for $+" do
+      defined?($+).should be_nil
+    end
+
+    it "returns nil for $1-$9" do
+      defined?($1).should be_nil
+      defined?($2).should be_nil
+      defined?($3).should be_nil
+      defined?($4).should be_nil
+      defined?($5).should be_nil
+      defined?($6).should be_nil
+      defined?($7).should be_nil
+      defined?($8).should be_nil
+      defined?($9).should be_nil
+    end
+  end
+
+  describe "when a Regexp matches a String" do
+    before :each do
+      /s(-)m(.)/ =~ "mis-matched"
+    end
+
+    ruby_version_is ""..."1.9" do
+      it "returns 'global-variable' for $~" do
+        defined?($~).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $&" do
+        defined?($&).should == "$&"
+      end
+
+      it "returns 'global-variable' for $`" do
+        defined?($`).should == "$`"
+      end
+
+      it "returns 'global-variable' for $'" do
+        defined?($').should == "$'"
+      end
+
+      it "returns 'global-variable' for $+" do
+        defined?($+).should == "$+"
+      end
+
+      it "returns 'global-variable' for the capture references" do
+        defined?($1).should == "$1"
+        defined?($2).should == "$2"
+      end
+    end
+
+    ruby_version_is "1.9" do
+      it "returns 'global-variable' for $~" do
+        defined?($~).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $&" do
+        defined?($&).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $`" do
+        defined?($`).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $'" do
+        defined?($').should == "global-variable"
+      end
+
+      it "returns 'global-variable' for $+" do
+        defined?($+).should == "global-variable"
+      end
+
+      it "returns 'global-variable' for the capture references" do
+        defined?($1).should == "global-variable"
+        defined?($2).should == "global-variable"
+      end
+    end
+
+    it "returns nil for non-captures" do
+      defined?($3).should be_nil
+      defined?($4).should be_nil
+      defined?($5).should be_nil
+      defined?($6).should be_nil
+      defined?($7).should be_nil
+      defined?($8).should be_nil
+      defined?($9).should be_nil
+    end
+  end
+  it "returns 'global-variable' for a global variable that has been assigned" do
+    DefinedSpecs::Basic.new.global_variable_defined.should == "global-variable"
+  end
+
+  it "returns nil for a class variable that has not been read" do
+    DefinedSpecs::Basic.new.class_variable_undefined.should be_nil
+  end
+
+  # There is no spec for a class variable that is read before being assigned
+  # to because setting up the code for this raises a NameError before you
+  # get to the defined? call so it really has nothing to do with 'defined?'.
+
+  it "returns 'class variable' when called with the name of a class variable" do
+    DefinedSpecs::Basic.new.class_variable_defined.should == "class variable"
+  end
+
+  ruby_version_is ""..."1.9" do
+    not_compliant_on :rubinius do
+      it "returns 'local-variable(in-block)' when called with the name of a block local" do
+        block = Proc.new { |xxx| defined?(xxx) }
+        block.call(1).should == "local-variable(in-block)"
+      end
+    end
+
   deviates_on :rubinius do
     # Rubinius does not care about dynamic vars
-    it "returns 'local-variable' when defined? is called on a block var" do
+    it "returns 'local-variable' when called with the name of a block local" do
       block = Proc.new { |x| defined?(x) }
       ret = block.call(1)
       ret.should == 'local-variable'
     end
   end
 
-  it "returns 'super' when Subclass#no_args uses defined?" do
-    ret = (LanguageDefinedSubclass.new.no_args)
-    ret.should == "super"
   end
 
-  it "returns 'super' when Subclass#args uses defined?" do
-    ret = (LanguageDefinedSubclass.new.args)
-    ret.should == "super"
+  ruby_version_is "1.9" do
+    it "returns 'local-variable' when called with the name of a block local" do
+      block = Proc.new { |xxx| defined?(xxx) }
+      block.call(1).should == "local-variable"
+    end
   end
+end
 
-  it "returns 'super' when Subclass#no_args and created with define_method" do
-    ret = (LanguageDefinedSubclassDM.new.no_args)
-    ret.should == "super"
+describe "The defined? keyword for a simple constant" do
+  it "returns 'constant' when the constant is defined" do
+    defined?(DefinedSpecs).should == "constant"
   end
 
-  it "returns 'super' when Subclass#args and created with define_method" do
-    ret = (LanguageDefinedSubclassDM.new.args)
-    ret.should == "super"
+  it "returns nil when the constant is not defined" do
+    defined?(DefinedSpecsUndefined).should be_nil
   end
 
-  it "returns 'super' when Subclass#no_args uses a block" do
-    ret = (LanguageDefinedSubclassBlock.new.no_args)
-    ret.should == "super"
+  it "does not call Object.const_missing if the constant is not defined" do
+    Object.should_not_receive(:const_missing)
+    defined?(DefinedSpecsUndefined).should be_nil
   end
 
-  it "returns 'super' when Subclass#args uses a block" do
-    ret = (LanguageDefinedSubclassBlock.new.args)
-    ret.should == "super"
+  it "returns 'constant' for an included module" do
+    DefinedSpecs::Child.module_defined.should == "constant"
   end
 
-  it "returns 'super' when Subclass#no_args uses a block in define_method" do
-    ret = (LanguageDefinedSubclassDMBlock.new.no_args)
-    ret.should == "super"
+  it "returns 'constant' for a constant defined in an included module" do
+    DefinedSpecs::Child.module_constant_defined.should == "constant"
   end
+end
 
-  it "returns 'super' when Subclass#args uses a block in define_method" do
-    ret = (LanguageDefinedSubclassDMBlock.new.args)
-    ret.should == "super"
+describe "The defined? keyword for a top-level constant" do
+  it "returns 'constant' when passed the name of a top-level constant" do
+    defined?(::DefinedSpecs).should == "constant"
   end
 
-  not_compliant_on :rubinius do
-    ruby_version_is "" ... "1.9" do
-      it "returns 'local-variable(in-block)' when defined? is called on a block var" do
-        block = Proc.new { |xxx| defined?(xxx) }
-        ret = block.call(1)
-        ret.should == 'local-variable(in-block)'
+  it "retuns nil if the constant is not defined" do
+    defined?(::DefinedSpecsUndefined).should be_nil
+  end
+
+  it "does not call Object.const_missing if the constant is not defined" do
+    Object.should_not_receive(:const_missing)
+    defined?(::DefinedSpecsUndefined).should be_nil
+  end
+end
+
+describe "The defined? keyword for a scoped constant" do
+  it "returns 'constant' when the scoped constant is defined" do
+    defined?(DefinedSpecs::Basic).should == "constant"
+  end
+
+  it "returns nil when the scoped constant is not defined" do
+    defined?(DefinedSpecs::Undefined).should be_nil
+  end
+
+  ruby_version_is ""..."1.9" do
+    it "calls .const_missing if the constant is not defined" do
+      Object.should_receive(:const_missing).with(:DefinedSpecsUndefined).and_return(nil)
+      defined?(DefinedSpecsUndefined::A).should be_nil
+    end
+
+    it "calls .const_missing and uses the return constant for scope" do
+      Object.should_receive(:const_missing).with(:DefinedSpecsUndefined).and_return(DefinedSpecs)
+      defined?(DefinedSpecsUndefined::Child).should == "constant"
+    end
+  end
+
+  it "returns nil when an undefined constant is scoped to a defined constant" do
+    defined?(DefinedSpecs::Child::B).should be_nil
+  end
+
+  it "returns nil when the undefined constant is scoped to an undefined constant" do
+    defined?(DefinedSpecs::Undefined::Undefined).should be_nil
+  end
+
+  it "return 'constant' if the scoped-scoped constant is defined" do
+    defined?(DefinedSpecs::Child::A).should == "constant"
+  end
+
+  ruby_version_is ""..."1.9" do
+    describe "when the scope chain has undefined constants" do
+      it "calls .const_missing for each constant in the scope chain and returns nil if any are not defined" do
+        Object.should_receive(:const_missing).with(:DefinedSpecsUndefined).and_return(DefinedSpecs)
+        DefinedSpecs.should_receive(:const_missing).with(:Undefined).and_return(nil)
+        defined?(DefinedSpecsUndefined::Undefined::Undefined).should be_nil
       end
+
+      it "calls .const_missing and returns 'constant' if all constants are defined" do
+        Object.should_receive(:const_missing).with(:DefinedSpecsUndefined).and_return(DefinedSpecs)
+        DefinedSpecs.should_receive(:const_missing).with(:Undefined).and_return(DefinedSpecs::Child)
+        defined?(DefinedSpecsUndefined::Undefined::A).should == "constant"
+      end
     end
   end
+end
 
-  ruby_version_is "1.9" do
-    it "returns 'local-variable' when defined? is called on a block var" do
-      block = Proc.new { |xxx| defined?(xxx) }
-      ret = block.call(1)
-      ret.should == 'local-variable'
+describe "The defined? keyword for a top-level scoped constant" do
+  it "returns 'constant' when the scoped constant is defined" do
+    defined?(::DefinedSpecs::Basic).should == "constant"
+  end
+
+  it "returns nil when the scoped constant is not defined" do
+    defined?(::DefinedSpecs::Undefined).should be_nil
+  end
+
+  ruby_version_is ""..."1.9" do
+    it "calls .const_missing if the constant is not defined" do
+      Object.should_receive(:const_missing).with(:DefinedSpecsUndefined).and_return(nil)
+      defined?(::DefinedSpecsUndefined::A).should be_nil
     end
+
+    it "calls .const_missing and uses the return constant for scope" do
+      Object.should_receive(:const_missing).with(:DefinedSpecsUndefined).and_return(DefinedSpecs)
+      defined?(::DefinedSpecsUndefined::Child).should == "constant"
+    end
   end
 
-  it "returns nil for an instance variable not yet accessed" do
-    instance = LanguageDefinedSpecs.new
-    ret = instance.ivar_definition
-    ret.should == nil
+  it "returns nil when an undefined constant is scoped to a defined constant" do
+    defined?(::DefinedSpecs::Child::B).should be_nil
   end
 
-  it "returns nil for an instance variable read but not yet assigned" do
-    instance = LanguageDefinedSpecs.new
-    read_value = instance.ivar
-    ret = instance.ivar_definition
-    ret.should == nil
+  it "returns nil when the undefined constant is scoped to an undefined constant" do
+    defined?(::DefinedSpecs::Undefined::Undefined).should be_nil
   end
 
-  it "returns 'instance-variable' for an instance variable defined in an instance" do
-    instance = LanguageDefinedSpecs.new
-    instance.ivar = 2
-    ret = instance.ivar_definition
-    ret.should == 'instance-variable'
+  it "return 'constant' if the scoped-scoped constant is defined" do
+    defined?(::DefinedSpecs::Child::A).should == "constant"
   end
 
-  it "follows normal lexical and hierarchical scoping for constants" do
-    o = Object.new
-    class << o
-      module Foo
-        Bar = 1
+  ruby_version_is ""..."1.9" do
+    describe "when the scope chain has undefined constants" do
+      it "calls .const_missing for each constant in the scope chain and returns nil if any are not defined" do
+        Object.should_receive(:const_missing).with(:DefinedSpecsUndefined).and_return(DefinedSpecs)
+        DefinedSpecs.should_receive(:const_missing).with(:Undefined).and_return(nil)
+        defined?(::DefinedSpecsUndefined::Undefined::Undefined).should be_nil
       end
-      class Baz; include Foo; end
-      class Baz;
-        def self.foo_defined; defined? Foo; end
-        def self.bar_defined; defined? Bar; end
+
+      it "calls .const_missing and returns 'constant' if all constants are defined" do
+        Object.should_receive(:const_missing).with(:DefinedSpecsUndefined).and_return(DefinedSpecs)
+        DefinedSpecs.should_receive(:const_missing).with(:Undefined).and_return(DefinedSpecs::Child)
+        defined?(::DefinedSpecsUndefined::Undefined::A).should == "constant"
       end
-      def baz; Baz; end
     end
+  end
+end
 
-    o.baz.foo_defined.should == "constant";
-    o.baz.bar_defined.should == "constant";
+describe "The defined? keyword for a self-send method call scoped constant" do
+  it "returns nil if the constant is not defined in the scope of the method's value" do
+    defined?(defined_specs_method::Undefined).should be_nil
   end
+
+  it "returns 'constant' if the constant is defined in the scope of the method's value" do
+    defined?(defined_specs_method::Basic).should == "constant"
+  end
+
+  it "returns nil if the last constant is not defined in the scope chain" do
+    defined?(defined_specs_method::Basic::Undefined).should be_nil
+  end
+
+  it "returns nil if the middle constant is not defined in the scope chain" do
+    defined?(defined_specs_method::Undefined::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if all the constants in the scope chain are defined" do
+    defined?(defined_specs_method::Basic::A).should == "constant"
+  end
 end
 
+describe "The defined? keyword for a receiver method call scoped constant" do
+  it "returns nil if the constant is not defined in the scope of the method's value" do
+    defined?(defined_specs_receiver.defined_method::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if the constant is defined in the scope of the method's value" do
+    defined?(defined_specs_receiver.defined_method::Basic).should == "constant"
+  end
+
+  it "returns nil if the last constant is not defined in the scope chain" do
+    defined?(defined_specs_receiver.defined_method::Basic::Undefined).should be_nil
+  end
+
+  it "returns nil if the middle constant is not defined in the scope chain" do
+    defined?(defined_specs_receiver.defined_method::Undefined::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if all the constants in the scope chain are defined" do
+    defined?(defined_specs_receiver.defined_method::Basic::A).should == "constant"
+  end
+end
+
+describe "The defined? keyword for a module method call scoped constant" do
+  it "returns nil if the constant is not defined in the scope of the method's value" do
+    defined?(DefinedSpecs.defined_method::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if the constant scoped by the method's value is defined" do
+    defined?(DefinedSpecs.defined_method::Basic).should == "constant"
+  end
+
+  it "returns nil if the last constant in the scope chain is not defined" do
+    defined?(DefinedSpecs.defined_method::Basic::Undefined).should be_nil
+  end
+
+  it "returns nil if the middle constant in the scope chain is not defined" do
+    defined?(DefinedSpecs.defined_method::Undefined::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if all the constants in the scope chain are defined" do
+    defined?(DefinedSpecs.defined_method::Basic::A).should == "constant"
+  end
+
+  it "returns nil if the outer scope constant in the receiver is not defined" do
+    defined?(Undefined::DefinedSpecs.defined_method::Basic).should be_nil
+  end
+
+  it "returns nil if the scoped constant in the receiver is not defined" do
+    defined?(DefinedSpecs::Undefined.defined_method::Basic).should be_nil
+  end
+
+  it "returns 'constant' if all the constants in the receiver are defined" do
+    defined?(Object::DefinedSpecs.defined_method::Basic).should == "constant"
+  end
+
+  it "returns 'constant' if all the constants in the receiver and scope chain are defined" do
+    defined?(Object::DefinedSpecs.defined_method::Basic::A).should == "constant"
+  end
+end
+
+describe "The defined? keyword for a variable scoped constant" do
+  it "returns nil if the scoped constant is not defined" do
+    @defined_specs_obj = DefinedSpecs::Basic
+    defined?(@defined_specs_obj::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if the constant is defined in the scope of the variable reference" do
+    @defined_specs_obj = DefinedSpecs::Basic
+    defined?(@defined_specs_obj::A).should == "constant"
+  end
+
+  it "returns nil if the scoped constant is not defined" do
+    $defined_specs_obj = DefinedSpecs::Basic
+    defined?($defined_specs_obj::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if the constant is defined in the scope of the variable reference" do
+    $defined_specs_obj = DefinedSpecs::Basic
+    defined?($defined_specs_obj::A).should == "constant"
+  end
+
+  it "returns nil if the scoped constant is not defined" do
+    @@defined_specs_obj = DefinedSpecs::Basic
+    defined?(@@defined_specs_obj::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if the constant is defined in the scope of the variable reference" do
+    @@defined_specs_obj = DefinedSpecs::Basic
+    defined?(@@defined_specs_obj::A).should == "constant"
+  end
+
+  it "returns nil if the scoped constant is not defined" do
+    defined_specs_obj = DefinedSpecs::Basic
+    defined?(defined_specs_obj::Undefined).should be_nil
+  end
+
+  it "returns 'constant' if the constant is defined in the scope of the variable reference" do
+    defined_specs_obj = DefinedSpecs::Basic
+    defined?(defined_specs_obj::A).should == "constant"
+  end
+end
+
+describe "The defined? keyword for a self:: scoped constant" do
+  it "returns 'constant' for a constant explicitly scoped to self:: when set" do
+    defined?(DefinedSpecs::SelfScoped).should == "constant"
+  end
+
+  it "returns 'constant' for a constant explicitly scoped to self:: in subclass's metaclass" do
+    DefinedSpecs::Child.parent_constant_defined.should == "constant"
+  end
+end
+
+describe "The defined? keyword for yield" do
+  it "returns nil if no block is passed to a method not taking a block parameter" do
+    DefinedSpecs::Basic.new.no_yield_block.should be_nil
+  end
+
+  it "returns nil if no block is passed to a method taking a block parameter" do
+    DefinedSpecs::Basic.new.no_yield_block_parameter.should be_nil
+  end
+
+  it "returns 'yield' if a block is passed to a method not taking a block parameter" do
+    DefinedSpecs::Basic.new.yield_block.should == "yield"
+  end
+
+  it "returns 'yield' if a block is passed to a method taking a block parameter" do
+    DefinedSpecs::Basic.new.yield_block_parameter.should == "yield"
+  end
+end
+
+describe "The defined? keyword for super" do
+  it "returns nil when a superclass undef's the method" do
+    DefinedSpecs::ClassWithoutMethod.new.test.should be_nil
+  end
+
+  describe "for a method taking no arguments" do
+    it "returns nil when no superclass method exists" do
+      DefinedSpecs::Super.new.no_super_method_no_args.should be_nil
+    end
+
+    it "returns nil from a block when no superclass method exists" do
+      DefinedSpecs::Super.new.no_super_method_block_no_args.should be_nil
+    end
+
+    it "returns nil from a #define_method when no superclass method exists" do
+      DefinedSpecs::Super.new.no_super_define_method_no_args.should be_nil
+    end
+
+    it "returns nil from a block in a #define_method when no superclass method exists" do
+      DefinedSpecs::Super.new.no_super_define_method_block_no_args.should be_nil
+    end
+
+    it "returns 'super' when a superclass method exists" do
+      DefinedSpecs::Super.new.method_no_args.should == "super"
+    end
+
+    it "returns 'super' from a block when a superclass method exists" do
+      DefinedSpecs::Super.new.method_block_no_args.should == "super"
+    end
+
+    it "returns 'super' from a #define_method when a superclass method exists" do
+      DefinedSpecs::Super.new.define_method_no_args.should == "super"
+    end
+
+    it "returns 'super' from a block in a #define_method when a superclass method exists" do
+      DefinedSpecs::Super.new.define_method_block_no_args.should == "super"
+    end
+  end
+
+  describe "for a method taking arguments" do
+    it "returns nil when no superclass method exists" do
+      DefinedSpecs::Super.new.no_super_method_args.should be_nil
+    end
+
+    it "returns nil from a block when no superclass method exists" do
+      DefinedSpecs::Super.new.no_super_method_block_args.should be_nil
+    end
+
+    it "returns nil from a #define_method when no superclass method exists" do
+      DefinedSpecs::Super.new.no_super_define_method_args.should be_nil
+    end
+
+    it "returns nil from a block in a #define_method when no superclass method exists" do
+      DefinedSpecs::Super.new.no_super_define_method_block_args.should be_nil
+    end
+
+    it "returns 'super' when a superclass method exists" do
+      DefinedSpecs::Super.new.method_args.should == "super"
+    end
+
+    it "returns 'super' from a block when a superclass method exists" do
+      DefinedSpecs::Super.new.method_block_args.should == "super"
+    end
+
+    it "returns 'super' from a #define_method when a superclass method exists" do
+      DefinedSpecs::Super.new.define_method_args.should == "super"
+    end
+
+    it "returns 'super' from a block in a #define_method when a superclass method exists" do
+      DefinedSpecs::Super.new.define_method_block_args.should == "super"
+    end
+  end
+end

Modified: MacRuby/trunk/spec/frozen/language/fixtures/defined.rb
===================================================================
--- MacRuby/trunk/spec/frozen/language/fixtures/defined.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/language/fixtures/defined.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,4 +1,212 @@
 module DefinedSpecs
+  self::SelfScoped = 42
+
+  def self.side_effects
+    ScratchPad.record :defined_specs_side_effects
+  end
+
+  def self.fixnum_method
+    ScratchPad.record :defined_specs_fixnum_method
+    42
+  end
+
+  def self.exception_method
+    ScratchPad.record :defined_specs_exception
+    raise "defined? specs exception method"
+  end
+
+  def self.defined_method
+    DefinedSpecs
+  end
+
+  class Basic
+    A = 42
+
+    def defined_method
+      DefinedSpecs
+    end
+
+    def a_defined_method
+    end
+
+    def local_variable_defined
+      x = 2
+      defined? x
+    end
+
+    def instance_variable_undefined
+      defined? @instance_variable_undefined
+    end
+
+    def instance_variable_read
+      value = @instance_variable_read
+      defined? @instance_variable_read
+    end
+
+    def instance_variable_defined
+      @instance_variable_defined = 1
+      defined? @instance_variable_defined
+    end
+
+    def global_variable_undefined
+      defined? $defined_specs_global_variable_undefined
+    end
+
+    def global_variable_read
+      value = $defined_specs_global_variable_read
+      defined? $defined_specs_global_variable_read
+    end
+
+    def global_variable_defined
+      $defined_specs_global_variable_defined = 1
+      defined? $defined_specs_global_variable_defined
+    end
+
+    def class_variable_undefined
+      defined? @@class_variable_undefined
+    end
+
+    def class_variable_defined
+      @@class_variable_defined = 1
+      defined? @@class_variable_defined
+    end
+
+    def yield_defined_method
+      defined? yield
+    end
+
+    def yield_defined_parameter_method(&block)
+      defined? yield
+    end
+
+    def no_yield_block
+      yield_defined_method
+    end
+
+    def no_yield_block_parameter
+      yield_defined_parameter_method
+    end
+
+    def yield_block
+      yield_defined_method { 42 }
+    end
+
+    def yield_block_parameter
+      yield_defined_parameter_method { 42 }
+    end
+  end
+
+  module Mixin
+    MixinConstant = 42
+  end
+
+  class Parent
+    ParentConstant = 42
+  end
+
+  class Child < Parent
+    include Mixin
+
+    A = 42
+
+    def self.parent_constant_defined
+      defined? self::ParentConstant
+    end
+
+    def self.module_defined
+      defined? Mixin
+    end
+
+    def self.module_constant_defined
+      defined? MixinConstant
+    end
+  end
+
+  class Superclass
+    def yield_method
+      yield
+    end
+
+    def method_no_args
+    end
+
+    def method_args
+    end
+
+    def method_block_no_args
+    end
+
+    def method_block_args
+    end
+
+    def define_method_no_args
+    end
+
+    def define_method_args
+    end
+
+    def define_method_block_no_args
+    end
+
+    def define_method_block_args
+    end
+  end
+
+  class Super < Superclass
+    def no_super_method_no_args
+      defined? super
+    end
+
+    def no_super_method_args
+      defined? super()
+    end
+
+    def method_no_args
+      defined? super
+    end
+
+    def method_args
+      defined? super()
+    end
+
+    def no_super_method_block_no_args
+      yield_method { defined? super }
+    end
+
+    def no_super_method_block_args
+      yield_method { defined? super() }
+    end
+
+    def method_block_no_args
+      yield_method { defined? super }
+    end
+
+    def method_block_args
+      yield_method { defined? super() }
+    end
+
+    define_method(:no_super_define_method_no_args) { defined? super }
+    define_method(:no_super_define_method_args) { defined? super() }
+    define_method(:define_method_no_args) { defined? super }
+    define_method(:define_method_args) { defined? super() }
+
+    define_method(:no_super_define_method_block_no_args) do
+      yield_method { defined? super }
+    end
+
+    define_method(:no_super_define_method_block_args) do
+      yield_method { defined? super() }
+    end
+
+    define_method(:define_method_block_no_args) do
+      yield_method { defined? super }
+    end
+
+    define_method(:define_method_block_args) do
+      yield_method { defined? super() }
+    end
+  end
+
   class ClassWithMethod
     def test
     end
@@ -16,3 +224,13 @@
     end
   end
 end
+
+class Object
+  def defined_specs_method
+    DefinedSpecs
+  end
+
+  def defined_specs_receiver
+    DefinedSpecs::Basic.new
+  end
+end

Modified: MacRuby/trunk/spec/frozen/language/fixtures/variables.rb
===================================================================
--- MacRuby/trunk/spec/frozen/language/fixtures/variables.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/language/fixtures/variables.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -53,4 +53,6 @@
     end
   end
 
+  class ArraySubclass < Array
+  end
 end

Modified: MacRuby/trunk/spec/frozen/language/regexp/interpolation_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/language/regexp/interpolation_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/language/regexp/interpolation_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -17,12 +17,7 @@
     o = LanguageSpecs::ClassWith_to_s.new
     /#{o}/.should == /class_with_to_s/
   end
-  
-  it "throws NoMethodError on missing to_s" do
-    o = LanguageSpecs::ClassWithout_to_s.new
-    lambda { /#{o}/ }.should raise_error(NoMethodError)
-  end
-  
+
   it "allows interpolation which mixes modifiers" do
     re = /foo/i
     /#{re} bar/m.should == /(?i-mx:foo) bar/m

Modified: MacRuby/trunk/spec/frozen/language/variables_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/language/variables_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/language/variables_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -210,6 +210,157 @@
   end
 end
 
+describe "Basic multiple assignment" do
+  describe "with a single RHS value" do
+    it "does not call #to_ary on an Array instance" do
+      x = [1, 2]
+      x.should_not_receive(:to_ary)
+
+      a, b = x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "does not call #to_a on an Array instance" do
+      x = [1, 2]
+      x.should_not_receive(:to_a)
+
+      a, b = x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "does not call #to_ary on an Array subclass instance" do
+      x = VariablesSpecs::ArraySubclass.new [1, 2]
+      x.should_not_receive(:to_ary)
+
+      a, b = x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "does not call #to_a on an Array subclass instance" do
+      x = VariablesSpecs::ArraySubclass.new [1, 2]
+      x.should_not_receive(:to_a)
+
+      a, b = x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "calls #to_ary on an object" do
+      x = mock("single rhs value for masgn")
+      x.should_receive(:to_ary).and_return([1, 2])
+
+      a, b = x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "does not call #to_a on an object if #to_ary is not defined" do
+      x = mock("single rhs value for masgn")
+      x.should_not_receive(:to_a)
+
+      a, b = x
+      a.should == x
+      b.should be_nil
+    end
+
+    it "does not call #to_a on a String" do
+      x = "one\ntwo"
+
+      a, b = x
+      a.should == x
+      b.should be_nil
+    end
+  end
+
+  describe "with a splatted single RHS value" do
+    it "does not call #to_ary on an Array instance" do
+      x = [1, 2]
+      x.should_not_receive(:to_ary)
+
+      a, b = *x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "does not call #to_a on an Array instance" do
+      x = [1, 2]
+      x.should_not_receive(:to_a)
+
+      a, b = *x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "does not call #to_ary on an Array subclass instance" do
+      x = VariablesSpecs::ArraySubclass.new [1, 2]
+      x.should_not_receive(:to_ary)
+
+      a, b = *x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "does not call #to_a on an Array subclass instance" do
+      x = VariablesSpecs::ArraySubclass.new [1, 2]
+      x.should_not_receive(:to_a)
+
+      a, b = *x
+      a.should == 1
+      b.should == 2
+    end
+
+    it "calls #to_a on an object if #to_ary is not defined" do
+      x = mock("single splatted rhs value for masgn")
+      x.should_receive(:to_a).and_return([1, 2])
+
+      a, b = *x
+      a.should == 1
+      b.should == 2
+    end
+
+    ruby_version_is ""..."1.9" do
+      it "calls #to_ary on an object" do
+        x = mock("single splatted rhs value for masgn")
+        x.should_receive(:to_ary).and_return([1, 2])
+
+        a, b = *x
+        a.should == 1
+        b.should == 2
+      end
+
+      it "calls #to_a on a String" do
+        x = "one\ntwo"
+
+        a, b = *x
+        a.should == "one\n"
+        b.should == "two"
+      end
+    end
+
+    ruby_version_is "1.9" do
+      it "does not call #to_ary on an object" do
+        x = mock("single splatted rhs value for masgn")
+        x.should_not_receive(:to_ary)
+
+        a, b = *x
+        a.should == x
+        b.should be_nil
+      end
+
+      it "does not call #to_a on a String" do
+        x = "one\ntwo"
+
+        a, b = *x
+        a.should == x
+        b.should be_nil
+      end
+    end
+  end
+end
+
 describe "Assigning multiple values" do
   it "allows parallel assignment" do
     a, b = 1, 2

Modified: MacRuby/trunk/spec/frozen/library/net/ftp/fixtures/server.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/net/ftp/fixtures/server.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/library/net/ftp/fixtures/server.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -219,7 +219,7 @@
     end
     
     def stor(file)
-      tmp_file = tmp("#{file}file")
+      tmp_file = tmp("#{file}file", false)
       
       self.response("125 Data transfer starting.")
 

Modified: MacRuby/trunk/spec/frozen/library/net/ftp/shared/putbinaryfile.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/net/ftp/shared/putbinaryfile.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/library/net/ftp/shared/putbinaryfile.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,7 +4,7 @@
     @server.serve_once
 
     @local_fixture_file  = File.dirname(__FILE__) + "/../fixtures/putbinaryfile"
-    @remote_tmp_file = tmp("binaryfile")
+    @remote_tmp_file = tmp("binaryfile", false)
     
     @ftp = Net::FTP.new
     @ftp.connect("localhost", 9921)

Modified: MacRuby/trunk/spec/frozen/library/net/ftp/shared/puttextfile.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/net/ftp/shared/puttextfile.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/library/net/ftp/shared/puttextfile.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -4,7 +4,7 @@
     @server.serve_once
 
     @local_fixture_file  = File.dirname(__FILE__) + "/../fixtures/puttextfile"
-    @remote_tmp_file = tmp("textfile")
+    @remote_tmp_file = tmp("textfile", false)
 
     @ftp = Net::FTP.new
     @ftp.connect("localhost", 9921)

Modified: MacRuby/trunk/spec/frozen/library/net/ftp/storbinary_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/net/ftp/storbinary_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/library/net/ftp/storbinary_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -8,7 +8,7 @@
     @server.serve_once
 
     @local_fixture_file  = File.dirname(__FILE__) + "/fixtures/putbinaryfile"
-    @tmp_file = tmp("binaryfile")
+    @tmp_file = tmp("binaryfile", false)
 
     @ftp = Net::FTP.new
     @ftp.connect("localhost", 9921)

Modified: MacRuby/trunk/spec/frozen/library/net/ftp/storlines_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/net/ftp/storlines_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/library/net/ftp/storlines_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -8,7 +8,7 @@
     @server.serve_once
 
     @local_fixture_file  = File.dirname(__FILE__) + "/fixtures/puttextfile"
-    @tmp_file = tmp("textfile")
+    @tmp_file = tmp("textfile", false)
 
     @ftp = Net::FTP.new
     @ftp.connect("localhost", 9921)

Modified: MacRuby/trunk/spec/frozen/library/socket/fixtures/classes.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/socket/fixtures/classes.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/library/socket/fixtures/classes.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -16,12 +16,16 @@
   def self.port
     40001
   end
+  
+  def self.str_port
+    "40001"
+  end
 
   def self.sockaddr_in(port, host)
     Socket::SockAddr_In.new(Socket.sockaddr_in(port, host))
   end
 
   def self.socket_path
-    tmp("unix_server_spec.socket")
+    tmp("unix_server_spec.socket", false)
   end
 end

Modified: MacRuby/trunk/spec/frozen/library/socket/udpsocket/send_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/socket/udpsocket/send_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/library/socket/udpsocket/send_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -30,7 +30,19 @@
     @msg[1][1].should be_kind_of(Fixnum)
     @msg[1][3].should == "127.0.0.1"
   end
-
+  
+  it "sends data in ad hoc mode (with port given as a String)" do
+    @socket = UDPSocket.open
+    @socket.send("ad hoc", 0, SocketSpecs.hostname,SocketSpecs.str_port)
+    @socket.close
+    @server_thread.join
+      
+    @msg[0].should == "ad hoc"
+    @msg[1][0].should == "AF_INET"
+    @msg[1][1].should be_kind_of(Fixnum)
+    @msg[1][3].should == "127.0.0.1"
+  end
+  
   it "sends data in connection mode" do
     @socket = UDPSocket.open
     @socket.connect(SocketSpecs.hostname,SocketSpecs.port)

Modified: MacRuby/trunk/spec/frozen/library/stringscanner/getch_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/library/stringscanner/getch_spec.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/library/stringscanner/getch_spec.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -39,10 +39,13 @@
     s.getch.should == nil
   end
 
-  it "does not accept any arguments" do
-    s = StringScanner.new('abc')
-    lambda {
-      s.getch(5)
-    }.should raise_error(ArgumentError, /wrong .* arguments/)
+  it "always returns instance of String, never a String subclass" do
+    cls = Class.new(String)
+    sub = cls.new("abc")
+
+    s = StringScanner.new(sub)
+    ch = s.getch
+    ch.should_not be_kind_of(cls)
+    ch.should == "a"
   end
 end

Modified: MacRuby/trunk/spec/frozen/shared/complex/abs.rb
===================================================================
--- MacRuby/trunk/spec/frozen/shared/complex/abs.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/shared/complex/abs.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -2,11 +2,11 @@
 
 describe :complex_abs, :shared => true do
   it "returns the modulus: |a + bi| = sqrt((a ^ 2) + (b ^ 2))" do
-    Complex(0, 0).abs.should == 0
-    Complex(3, 4).abs.should == 5 # well-known integer case
-    Complex(-3, 4).abs.should == 5
-    Complex(1, -1).abs.should be_close(Math.sqrt(2), TOLERANCE)
-    Complex(6.5, 0).abs.should be_close(6.5, TOLERANCE)
-    Complex(0, -7.2).abs.should be_close(7.2, TOLERANCE)
+    Complex(0, 0).send(@method).should == 0
+    Complex(3, 4).send(@method).should == 5 # well-known integer case
+    Complex(-3, 4).send(@method).should == 5
+    Complex(1, -1).send(@method).should be_close(Math.sqrt(2), TOLERANCE)
+    Complex(6.5, 0).send(@method).should be_close(6.5, TOLERANCE)
+    Complex(0, -7.2).send(@method).should be_close(7.2, TOLERANCE)
   end
 end

Modified: MacRuby/trunk/spec/frozen/shared/file/blockdev.rb
===================================================================
--- MacRuby/trunk/spec/frozen/shared/file/blockdev.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/shared/file/blockdev.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,11 +1,11 @@
 describe :file_blockdev, :shared => true do
   it "returns true/false depending if the named file is a block device" do
-    @object.send(@method, tmp("/")).should == false
+    @object.send(@method, tmp("")).should == false
   end
 
   ruby_version_is "1.9" do
     it "accepts an object that has a #to_path method" do
-      @object.send(@method, mock_to_path(tmp("/"))).should == false
+      @object.send(@method, mock_to_path(tmp(""))).should == false
     end
   end
 end

Modified: MacRuby/trunk/spec/frozen/shared/file/chardev.rb
===================================================================
--- MacRuby/trunk/spec/frozen/shared/file/chardev.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/shared/file/chardev.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1,11 +1,11 @@
 describe :file_chardev, :shared => true do
   it "returns true/false depending if the named file is a char device" do
-    @object.send(@method, tmp("/")).should == false
+    @object.send(@method, tmp("")).should == false
   end
 
   ruby_version_is "1.9" do
     it "accepts an object that has a #to_path method" do
-      @object.send(@method, mock_to_path(tmp("/"))).should == false
+      @object.send(@method, mock_to_path(tmp(""))).should == false
     end
   end
 end

Modified: MacRuby/trunk/spec/frozen/shared/file/size.rb
===================================================================
--- MacRuby/trunk/spec/frozen/shared/file/size.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/shared/file/size.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -13,10 +13,10 @@
   end
 
   it "accepts a String-like (to_str) parameter" do
-    o = [@exists]
-    def o.to_str; self[0]; end
+    obj = mock("file")
+    obj.should_receive(:to_str).and_return(@exists)
 
-    @object.send(@method, o).should == 8
+    @object.send(@method, obj).should == 8
   end
 
   ruby_version_is "1.9" do
@@ -33,6 +33,10 @@
     rm_r @missing
   end
 
+  after :each do
+    rm_r @missing
+  end
+
   it "raises an error if file_name doesn't exist" do
     lambda {@object.send(@method, @missing)}.should raise_error(Errno::ENOENT)
   end
@@ -45,6 +49,10 @@
     rm_r @missing
   end
 
+  after :each do
+    rm_r @missing
+  end
+
   it "returns nil if file_name doesn't exist or has 0 size" do
      @object.send(@method, @missing).should == nil
   end

Modified: MacRuby/trunk/spec/frozen/shared/file/sticky.rb
===================================================================
--- MacRuby/trunk/spec/frozen/shared/file/sticky.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/shared/file/sticky.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -8,7 +8,7 @@
     Dir.rmdir(@dir) if File.exists?(@dir)
   end
   
-  platform_is_not :windows, :darwin, :freebsd do
+  platform_is_not :windows, :darwin, :freebsd, :solaris do
     it "returns true if the named file has the sticky bit, otherwise false" do
       Dir.mkdir @dir, 1755
       

Modified: MacRuby/trunk/spec/frozen/shared/rational/abs.rb
===================================================================
--- MacRuby/trunk/spec/frozen/shared/rational/abs.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/shared/rational/abs.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -3,10 +3,10 @@
 
 describe :rational_abs, :shared => true do
   it "returns self's absolute value" do
-    Rational(3, 4).abs.should == Rational(3, 4)
-    Rational(-3, 4).abs.should == Rational(3, 4)
-    Rational(3, -4).abs.should == Rational(3, 4)
+    Rational(3, 4).send(@method).should == Rational(3, 4)
+    Rational(-3, 4).send(@method).should == Rational(3, 4)
+    Rational(3, -4).send(@method).should == Rational(3, 4)
     
-    Rational(bignum_value, -bignum_value).abs.should == Rational(bignum_value, bignum_value)
+    Rational(bignum_value, -bignum_value).send(@method).should == Rational(bignum_value, bignum_value)
   end
 end

Modified: MacRuby/trunk/spec/frozen/spec_helper.rb
===================================================================
--- MacRuby/trunk/spec/frozen/spec_helper.rb	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/spec_helper.rb	2010-03-28 20:06:31 UTC (rev 3880)
@@ -50,7 +50,7 @@
 
 CODE_LOADING_DIR = File.expand_path "../fixtures/code", __FILE__
 
-minimum_version = "1.5.16"
+minimum_version = "1.5.17"
 unless MSpec::VERSION >= minimum_version
   puts "Please install MSpec version >= #{minimum_version} to run the specs"
   exit 1

Modified: MacRuby/trunk/spec/frozen/upstream
===================================================================
--- MacRuby/trunk/spec/frozen/upstream	2010-03-28 20:02:44 UTC (rev 3879)
+++ MacRuby/trunk/spec/frozen/upstream	2010-03-28 20:06:31 UTC (rev 3880)
@@ -1 +1 @@
-1d137b699c813be4d9f1f2728d68b44ab52ec36a
\ No newline at end of file
+4b2ea70bcbb0973dc81ef6fac0c42c1971d9acd6
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100328/d16d4f1a/attachment-0001.html>


More information about the macruby-changes mailing list