Fixnum#to_sym is not defined in Ruby 1.9 #261

Merged
merged 1 commit into from Aug 11, 2012

Projects

None yet

2 participants

@alindeman

In MRI 1.9, Fixnum does not respond to to_sym.

1.9.3-p194 :001 > 1.to_sym
NoMethodError: undefined method `to_sym' for 1:Fixnum
    from (irb):1
    from /Users/alindeman/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'

I got pretty confused when trying to write an automated test for this: I don't know if it should be a rubyspec (I haven't had good luck with getting my pull requests merged there) or a JRuby spec (Java or Ruby?). If anyone wants to hold my hand, let me know and I'll gladly try.

@headius
JRuby Team member

Yeah, good question...I'm not sure either. Since it doesn't seem to fit anywhere else very well (most other suites don't care about testing negative conditions), how about a spec for our spec/regression dir?

@headius headius merged commit af7bd1d into jruby:master Aug 11, 2012
@headius
JRuby Team member

Actually, don't worry about it...I'll just add one quick.

@headius headius added a commit that referenced this pull request Aug 11, 2012
@headius headius Spec for #261. 7b55532
@alindeman

Thanks :D

@eregon eregon added a commit that referenced this pull request May 29, 2016
@eregon eregon Squashed 'spec/ruby/' changes from 5c54bc7..842119c
842119c Guard spec currently failing on Windows
aa107f7 Write in text mode to allow newline conversion and read in binary mode
a7ad8dd Use binary open modes for testing newlines
5240f19 Simplify language spec to use clearer Proc#call instead of Proc#[]
0142e23 Specs for Proc#arity. The current specs cover lambdas twice.
646adc2 Add a spec for zsuper passing splat and keyword arguments together
7a70098 Spec for not capturing a local variable in place of a block argument.
3963efc Spec for a block local assigned in a nested scope before initialization.
a1b181b [Truffle] Implement rb_ary_new_from_args.
512c59c Add spec to check string constructed from Array#pack has valid encoding.
98fc8f5 Add multi-byte character specs for String#{gsub,gsub!}.
342b52b [Truffle] Implement rb_Array().
6f3d788 [Truffle] rb_ary_store passes.
56fd602 [Truffle] Implement RARRAY_AREF.
69068e0 Test RARRAY_LEN even if RARRAY_PTR is not defined.
0b4fb5f [Truffle] rb_ary_{entry,push,pop}
525374c [Truffle] rb_ary_new2 is working a well.
38ccb78 [Truffle] First C-API spec passing!
7d7c404 Add support for compiling & testing optional C API specs on JRuby+Truffle.
f128b49 Make sure Object.const_missing is not called for defined?(Undefined::Object)
2056323 Fix spec to compare hashes properly.
3904950 Add a spec for hashing a double-nested array with inner zarray.
f253ed0 Also check content of encoded File.basename result.
dbb6b46 Test that File.basename preserves the encoding of the original.
60f3439 Add some specs for puts with newline conversion.
c551794 Expand specs for visibility under direct and indirect situations.
0017fcd Wrap extra GNU Readline features in platform guards so it passes on OS X libedit
f79cdb7 Merge pull request #261 from nobu/master
8aa3424 protoize CAPI test codes
bab5937 Specify rb_define_class
beacfe6 Disable readline specs on Windows for now as the behavior varies significantly
62ba370 Let's try to enable the readline specs by default again.
3e46008 Merge pull request #260 from nobu/fix-capi-warnings
d87060a Remove not portable and unrealistic DATA spec
1895d1f Merge pull request #259 from odaira/myContribution
b557adb Fix suggest-attribute=noreturn
84511ed Add a spec for DATA.rewind
2cb8dd7 Merge pull request #258 from nobu/refine-setsid
9a72b57 Check session ID values
5f98f99 Try to make the rb_big_pack spec more accurate
494be5b Do not rely on Fixnum class name in Process#setsid spec
67b01ca Allow Fixnum = Integer for rb_obj_classname
5be3488 Adapt specs for improvements in Bignum#coerce
c501ee4 Do not try to call rb_big functions with fixnum-range values.
369c97e Make sure our assumptions hold about the ensure_bignum helper
b6abf84 Merge pull request #255 from odaira/myContribution
d406960 Cannot flock DATA with LOCK_EX on AIX because a file opened as read-only cannot be exclusively locked on AIX

git-subtree-dir: spec/ruby
git-subtree-split: 842119cca99f84503f574ee4fb42bfb7a8d80f2f
e608800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment