Shamaoke
2011-Apr-06 07:53 UTC
[rspec-users] Metadata raises CompatibilityError when I try to inspect it
Hi.
When I try to inspect example metadata, for some reason it raises the
encoding compatibility exception.
~~~
describe RSpec::Core::Metadata do
describe ''#inspect'' do
it ''raises Encoding::CompatibilityError'' do
expect {
example.metadata.inspect
}.to raise_error(Encoding::CompatibilityError)
end
end
describe ''#to_s'' do
it ''raises Encoding::CompatibilityError'' do
expect {
example.metadata.to_s
}.to raise_error(Encoding::CompatibilityError)
end
end
end
~~~
~~~
$ rspec metadata_spec.rb
..
Finished in 0.00128 seconds
2 examples, 0 failures
~~~
It raises nothing if I use the `$ ruby ...` instead of `$ rspec ...`
command.
What is the reason of this bug? How can I fix it?
Thanks.
Debian GNU/Linux 6.0.1;
Ruby 1.9.2p0;
RSpec 2.5.1.
Justin Ko
2011-Apr-07 05:04 UTC
[rspec-users] Metadata raises CompatibilityError when I try to inspect it
On Wed, Apr 6, 2011 at 12:53 AM, Shamaoke <shamaoke at hotmail.com> wrote:> Hi. > > When I try to inspect example metadata, for some reason it raises the > encoding compatibility exception. > > ~~~ > describe RSpec::Core::Metadata do > describe ''#inspect'' do > it ''raises Encoding::CompatibilityError'' do > expect { > example.metadata.inspect > }.to raise_error(Encoding::CompatibilityError) > end > end > > describe ''#to_s'' do > it ''raises Encoding::CompatibilityError'' do > expect { > example.metadata.to_s > }.to raise_error(Encoding::CompatibilityError) > end > end > end > ~~~ > > ~~~ > $ rspec metadata_spec.rb > .. > > Finished in 0.00128 seconds > 2 examples, 0 failures > ~~~ > > It raises nothing if I use the `$ ruby ...` instead of `$ rspec ...` > command. > > What is the reason of this bug? How can I fix it? > > Thanks. > > Debian GNU/Linux 6.0.1; > Ruby 1.9.2p0; > RSpec 2.5.1. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-usersHello, I think this might be a bug in your Ruby 1.9.2 patch version. I''m using 1.9.2-p180 and cannot reproduce this. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110406/a2597fbb/attachment.html>
Shamaoke
2011-Apr-09 14:14 UTC
[rspec-users] Metadata raises CompatibilityError when I try to inspect it
I installed Ruby 1.9.2-p180 from the sources. Unfortunatelly, the bug still exists: http://dl.dropbox.com/u/20481401/compatability_error.png On 7 ???, 09:04, Justin Ko <jko... at gmail.com> wrote:> On Wed, Apr 6, 2011 at 12:53 AM, Shamaoke <shama... at hotmail.com> wrote: > > Hi. > > > When I try to inspect example metadata, for some reason it raises the > > encoding compatibility exception. > > > ~~~ > > describe RSpec::Core::Metadata do > > ?describe ''#inspect'' do > > ? ?it ''raises Encoding::CompatibilityError'' do > > ? ? ?expect { > > ? ? ? ?example.metadata.inspect > > ? ? ?}.to raise_error(Encoding::CompatibilityError) > > ? ?end > > ?end > > > ?describe ''#to_s'' do > > ? ?it ''raises Encoding::CompatibilityError'' do > > ? ? ?expect { > > ? ? ? ?example.metadata.to_s > > ? ? ?}.to raise_error(Encoding::CompatibilityError) > > ? ?end > > ?end > > end > > ~~~ > > > ~~~ > > $ rspec metadata_spec.rb > > .. > > > Finished in 0.00128 seconds > > 2 examples, 0 failures > > ~~~ > > > It raises nothing if I use the `$ ruby ...` instead of `$ rspec ...` > > command. > > > What is the reason of this bug? How can I fix it? > > > Thanks. > > > Debian GNU/Linux 6.0.1; > > Ruby 1.9.2p0; > > RSpec 2.5.1. > > _______________________________________________ > > rspec-users mailing list > > rspec-us... at rubyforge.org > >http://rubyforge.org/mailman/listinfo/rspec-users > > Hello, I think this might be a bug in your Ruby 1.9.2 patch version. I''m > using 1.9.2-p180 and cannot reproduce this. > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
Shamaoke
2011-Apr-11 09:08 UTC
[rspec-users] Metadata raises CompatibilityError when I try to inspect it
I tackled the problem. If you use the Unicode characters in the path to a spec directory the bug appears. If not to use them, all goes without any problems. So, using the path `/home/username/??????????/ruby/my_application/ spec` will raise the exception, but `/home/username/development/ruby/ my_application/spec` will not. On 9 ???, 18:14, Shamaoke <shama... at hotmail.com> wrote:> I installed Ruby 1.9.2-p180 from the sources. Unfortunatelly, the bug > still exists: > > http://dl.dropbox.com/u/20481401/compatability_error.png > > On 7 ???, 09:04, Justin Ko <jko... at gmail.com> wrote: > > > > > > > > > On Wed, Apr 6, 2011 at 12:53 AM, Shamaoke <shama... at hotmail.com> wrote: > > > Hi. > > > > When I try to inspect example metadata, for some reason it raises the > > > encoding compatibility exception. > > > > ~~~ > > > describe RSpec::Core::Metadata do > > > ?describe ''#inspect'' do > > > ? ?it ''raises Encoding::CompatibilityError'' do > > > ? ? ?expect { > > > ? ? ? ?example.metadata.inspect > > > ? ? ?}.to raise_error(Encoding::CompatibilityError) > > > ? ?end > > > ?end > > > > ?describe ''#to_s'' do > > > ? ?it ''raises Encoding::CompatibilityError'' do > > > ? ? ?expect { > > > ? ? ? ?example.metadata.to_s > > > ? ? ?}.to raise_error(Encoding::CompatibilityError) > > > ? ?end > > > ?end > > > end > > > ~~~ > > > > ~~~ > > > $ rspec metadata_spec.rb > > > .. > > > > Finished in 0.00128 seconds > > > 2 examples, 0 failures > > > ~~~ > > > > It raises nothing if I use the `$ ruby ...` instead of `$ rspec ...` > > > command. > > > > What is the reason of this bug? How can I fix it? > > > > Thanks. > > > > Debian GNU/Linux 6.0.1; > > > Ruby 1.9.2p0; > > > RSpec 2.5.1. > > > _______________________________________________ > > > rspec-users mailing list > > > rspec-us... at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/rspec-users > > > Hello, I think this might be a bug in your Ruby 1.9.2 patch version. I''m > > using 1.9.2-p180 and cannot reproduce this. > > > _______________________________________________ > > rspec-users mailing list > > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users